Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve argument type mismatch error position, and do not stop …
…at application type mismatch errors
- Loading branch information
1 parent
0c8a6d8
commit 40c8db7
Showing
20 changed files
with
71 additions
and
26 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
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,7 @@ | ||
def boo (x : Nat) (y : Nat) := x + y | ||
def bla (x : Nat) := boo x | ||
|
||
#check bla (y := 2) 5 -- Ok | ||
#check bla (y := 5) "hi" -- 1 error at "hi" | ||
#check bla (z := 5) "hi" -- 2 errors at `(z := 5)` and "hi" | ||
#check bla (z := 5) 2 -- 1 errors at `(z := 5)` |
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,20 @@ | ||
bla 5 2 : Nat | ||
nameArgErrorIssue.lean:5:20-5:24: error: application type mismatch | ||
bla "hi" | ||
argument | ||
"hi" | ||
has type | ||
String : Type | ||
but is expected to have type | ||
Nat : Type | ||
bla (sorryAx Nat) 5 : Nat | ||
nameArgErrorIssue.lean:6:20-6:24: error: application type mismatch | ||
bla "hi" | ||
argument | ||
"hi" | ||
has type | ||
String : Type | ||
but is expected to have type | ||
Nat : Type | ||
nameArgErrorIssue.lean:6:11-6:19: error: invalid argument name 'z' for function 'bla' | ||
nameArgErrorIssue.lean:7:11-7:19: error: invalid argument name 'z' for function 'bla' |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
phashmap_inst_coherence.lean:12:6-12:56: error: application type mismatch | ||
phashmap_inst_coherence.lean:12:53-12:54: error: application type mismatch | ||
PersistentHashMap.find? m | ||
argument | ||
m | ||
has type | ||
@PersistentHashMap Nat Nat instBEqNat instHashableNat : Type | ||
but is expected to have type | ||
@PersistentHashMap Nat Nat instBEqNat natDiffHash : Type | ||
phashmap_inst_coherence.lean:12:0-12:56: error: cannot evaluate code because '_eval._lambda_1' uses 'sorry' and/or contains errors |
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