-
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.
[ elab ] Print script's FC in the bad elaboration script error
- Loading branch information
Showing
4 changed files
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module BadElabScript | ||
|
||
import Language.Reflection | ||
|
||
%language ElabReflection | ||
|
||
x : Elab Nat | ||
x = do | ||
ignore $ check {expected=Type} `(Nat) | ||
?someHole | ||
check `(%search) | ||
|
||
y : Nat | ||
y = %runElab 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,21 @@ | ||
1/1: Building BadElabScript (BadElabScript.idr) | ||
Error: While processing right hand side of y. Bad elaborator script ?someHole [no locals in scope] (script is not a data value). | ||
|
||
BadElabScript:14:5--14:15 | ||
10 | ?someHole | ||
11 | check `(%search) | ||
12 | | ||
13 | y : Nat | ||
14 | y = %runElab x | ||
^^^^^^^^^^ | ||
|
||
Stuck place in the script: | ||
|
||
BadElabScript:10:3--10:12 | ||
06 | | ||
07 | x : Elab Nat | ||
08 | x = do | ||
09 | ignore $ check {expected=Type} `(Nat) | ||
10 | ?someHole | ||
^^^^^^^^^ | ||
|
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 BadElabScript.idr |