-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [ new ] Support type annotations on monadic bind * don't parse quantites on patbind * Update changelog
- Loading branch information
1 parent
0ea7c59
commit f561c78
Showing
9 changed files
with
122 additions
and
24 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
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,36 @@ | ||
foo : IO Nat | ||
|
||
test1 : IO () | ||
test1 = do | ||
x : Nat <- foo | ||
printLn x | ||
|
||
test2 : IO () | ||
test2 = do | ||
1 x : Nat <- foo | ||
printLn x | ||
|
||
test3 : IO () | ||
test3 = do | ||
0 x : Nat <- foo | ||
printLn x | ||
|
||
test4 : IO () | ||
test4 = do | ||
1 x <- foo | ||
printLn x | ||
|
||
test5 : IO () | ||
test5 = do | ||
0 x <- foo | ||
printLn x | ||
|
||
bar : IO (Maybe Nat) | ||
|
||
test6 : IO () | ||
test6 = do | ||
Just x : Maybe Nat <- bar | ||
| Nothing => pure () | ||
printLn x | ||
|
||
|
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,41 @@ | ||
1/1: Building Issue3327 (Issue3327.idr) | ||
Error: While processing right hand side of test2. Trying to use linear name x in non-linear context. | ||
|
||
Issue3327:11:11--11:12 | ||
07 | | ||
08 | test2 : IO () | ||
09 | test2 = do | ||
10 | 1 x : Nat <- foo | ||
11 | printLn x | ||
^ | ||
|
||
Error: While processing right hand side of test3. x is not accessible in this context. | ||
|
||
Issue3327:16:11--16:12 | ||
12 | | ||
13 | test3 : IO () | ||
14 | test3 = do | ||
15 | 0 x : Nat <- foo | ||
16 | printLn x | ||
^ | ||
|
||
Error: While processing right hand side of test4. Trying to use linear name x in non-linear context. | ||
|
||
Issue3327:21:11--21:12 | ||
17 | | ||
18 | test4 : IO () | ||
19 | test4 = do | ||
20 | 1 x <- foo | ||
21 | printLn x | ||
^ | ||
|
||
Error: While processing right hand side of test5. x is not accessible in this context. | ||
|
||
Issue3327:26:11--26:12 | ||
22 | | ||
23 | test5 : IO () | ||
24 | test5 = do | ||
25 | 0 x <- foo | ||
26 | printLn x | ||
^ | ||
|
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,3 @@ | ||
. ../../../testutils.sh | ||
|
||
check Issue3327.idr |