-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ error ] Improve error messages for Delay &co
- Loading branch information
1 parent
b7bda5e
commit bc4176d
Showing
6 changed files
with
43 additions
and
5 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,13 @@ | ||
module DelayParse | ||
|
||
public export | ||
data MyStream : Type where | ||
(::) : (anA : a) | ||
-> (nextA : a -> a) | ||
-> Inf MyStream | ||
-> MyStream | ||
|
||
public export | ||
go : a -> (a -> a) -> MyStream | ||
go initA fn = | ||
MyStream.(::) initA fn (Delay (fn initA) fn) |
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,11 @@ | ||
1/1: Building DelayParse (DelayParse.idr) | ||
Error: Delay only takes one argument. | ||
|
||
DelayParse:13:44--13:46 | ||
09 | | ||
10 | public export | ||
11 | go : a -> (a -> a) -> MyStream | ||
12 | go initA fn = | ||
13 | MyStream.(::) initA fn (Delay (fn initA) fn) | ||
^^ | ||
|
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 @@ | ||
rm -rf build | ||
|
||
$1 --no-color --console-width 0 --check DelayParse.idr |