-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2458 from ucsd-progsys/fd/measure-conflicts
Give precedence to export local measures over imported measures
- Loading branch information
Showing
9 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- | See "MeasureOverlapC". | ||
module MeasureOverlapA where | ||
|
||
{-@ | ||
measure foo :: Bool -> Bool | ||
foo False = False | ||
foo True = True | ||
@-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- | See "MeasureOverlapC". | ||
module MeasureOverlapB where | ||
|
||
import MeasureOverlapA | ||
|
||
{-@ | ||
measure foo :: Bool -> Bool | ||
foo False = True | ||
foo True = False | ||
|
||
@-} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- | Tests that when names overlap, the local one is exported. | ||
-- | ||
-- In this case, measure @foo@ is defined in both "MeasureOverlapB" and | ||
-- "MeasureOverlapA". Both definitions are in scope in "MeasureOverlapB", | ||
-- but "MeasureOverlapB" only exports its local @foo@ measure. | ||
-- | ||
module MeasureOverlapC where | ||
|
||
import MeasureOverlapB | ||
|
||
{-@ lemma :: { foo False } @-} | ||
lemma :: () | ||
lemma = () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-- | See "MeasureOverlapE". | ||
module MeasureOverlapD where | ||
|
||
import MeasureOverlapA | ||
import MeasureOverlapB | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- | Tests that when names overlap, the one from the highest module | ||
-- lexicographically is exported. | ||
-- | ||
-- In this case, measure @foo@ is defined in both "MeasureOverlapB" and | ||
-- "MeasureOverlapA". Both definitions are in scope in "MeasureOverlapD", | ||
-- but "MeasureOverlapD" only reexports @foo@ from "MeasureOverlapB". | ||
-- | ||
module MeasureOverlapE where | ||
|
||
import MeasureOverlapD | ||
|
||
{-@ lemma :: { foo False } @-} | ||
lemma :: () | ||
lemma = () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters