-
Notifications
You must be signed in to change notification settings - Fork 464
fix error message on curried/uncurried signature mismatch #6414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
66a0601
fix error msg on curried/uncurried sig mismatch
tsnobip b6efc4c
mark function curry kind in value mismatch
tsnobip 018b17d
use expand_head to check type of functions
tsnobip 1f1b4b8
try passing tests in CI
tsnobip 04fd108
Revert "try passing tests in CI"
tsnobip af30226
shorten test file names
tsnobip 2870c96
shorten test file names even more
tsnobip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...sts/super_errors/expected/curried_value_instead_of_uncurried_in_curried_mode.res.expected
This file contains hidden or 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,28 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/curried_value_instead_of_uncurried_in_curried_mode.res[0m:[2m3:5-5:1[0m | ||
|
||
1 [2m│[0m module Foo: { | ||
2 [2m│[0m let add: (. int, int) => int | ||
[1;31m3[0m [2m│[0m } = [1;31m{[0m | ||
[1;31m4[0m [2m│[0m [1;31m let add = (a, b) => a + b[0m | ||
[1;31m5[0m [2m│[0m [1;31m}[0m | ||
6 [2m│[0m | ||
|
||
Signature mismatch: | ||
Modules do not match: | ||
{ | ||
let add: (int, int) => int | ||
} | ||
is not included in | ||
{ | ||
let add: (. int, int) => int | ||
} | ||
Values do not match: | ||
let add: (int, int) => int (curried) | ||
is not included in | ||
let add: (. int, int) => int (uncurried) | ||
[36m/.../fixtures/curried_value_instead_of_uncurried_in_curried_mode.res[0m:[2m2:3-30[0m: | ||
Expected declaration | ||
[36m/.../fixtures/curried_value_instead_of_uncurried_in_curried_mode.res[0m:[2m4:7-9[0m: | ||
Actual declaration |
29 changes: 29 additions & 0 deletions
29
...s/super_errors/expected/curried_value_instead_of_uncurried_in_uncurried_mode.res.expected
This file contains hidden or 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,29 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/curried_value_instead_of_uncurried_in_uncurried_mode.res[0m:[2m5:5-8:1[0m | ||
|
||
3 [2m│[0m module Foo: { | ||
4 [2m│[0m let add: (int, int) => int | ||
[1;31m5[0m [2m│[0m } = [1;31m{[0m | ||
[1;31m6[0m [2m│[0m [1;31m @@uncurried.swap[0m | ||
[1;31m7[0m [2m│[0m [1;31m let add = (. a, b) => a + b[0m | ||
[1;31m8[0m [2m│[0m [1;31m}[0m | ||
9 [2m│[0m | ||
|
||
Signature mismatch: | ||
Modules do not match: | ||
{ | ||
let add: (int, int) => int | ||
} | ||
is not included in | ||
{ | ||
let add: (int, int) => int | ||
} | ||
Values do not match: | ||
let add: (int, int) => int (curried) | ||
is not included in | ||
let add: (int, int) => int (uncurried) | ||
[36m/.../fixtures/curried_value_instead_of_uncurried_in_uncurried_mode.res[0m:[2m4:3-28[0m: | ||
Expected declaration | ||
[36m/.../fixtures/curried_value_instead_of_uncurried_in_uncurried_mode.res[0m:[2m7:7-9[0m: | ||
Actual declaration |
28 changes: 28 additions & 0 deletions
28
...sts/super_errors/expected/uncurried_value_instead_of_curried_in_curried_mode.res.expected
This file contains hidden or 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,28 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/uncurried_value_instead_of_curried_in_curried_mode.res[0m:[2m3:5-5:1[0m | ||
|
||
1 [2m│[0m module Foo: { | ||
2 [2m│[0m let add: (int, int) => int | ||
[1;31m3[0m [2m│[0m } = [1;31m{[0m | ||
[1;31m4[0m [2m│[0m [1;31m let add = (. a, b) => a + b[0m | ||
[1;31m5[0m [2m│[0m [1;31m}[0m | ||
6 [2m│[0m | ||
|
||
Signature mismatch: | ||
Modules do not match: | ||
{ | ||
let add: (. int, int) => int | ||
} | ||
is not included in | ||
{ | ||
let add: (int, int) => int | ||
} | ||
Values do not match: | ||
let add: (. int, int) => int (uncurried) | ||
is not included in | ||
let add: (int, int) => int (curried) | ||
[36m/.../fixtures/uncurried_value_instead_of_curried_in_curried_mode.res[0m:[2m2:3-28[0m: | ||
Expected declaration | ||
[36m/.../fixtures/uncurried_value_instead_of_curried_in_curried_mode.res[0m:[2m4:7-9[0m: | ||
Actual declaration |
28 changes: 28 additions & 0 deletions
28
...s/super_errors/expected/uncurried_value_instead_of_curried_in_uncurried_mode.res.expected
This file contains hidden or 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,28 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/uncurried_value_instead_of_curried_in_uncurried_mode.res[0m:[2m6:5-8:1[0m | ||
|
||
4 [2m│[0m @@uncurried.swap | ||
5 [2m│[0m let add: (. int, int) => int | ||
[1;31m6[0m [2m│[0m } = [1;31m{[0m | ||
[1;31m7[0m [2m│[0m [1;31m let add = (a, b) => a + b[0m | ||
[1;31m8[0m [2m│[0m [1;31m}[0m | ||
9 [2m│[0m | ||
|
||
Signature mismatch: | ||
Modules do not match: | ||
{ | ||
let add: (int, int) => int | ||
} | ||
is not included in | ||
{ | ||
let add: (int, int) => int | ||
} | ||
Values do not match: | ||
let add: (int, int) => int (uncurried) | ||
is not included in | ||
let add: (int, int) => int (curried) | ||
[36m/.../fixtures/uncurried_value_instead_of_curried_in_uncurried_mode.res[0m:[2m5:3-30[0m: | ||
Expected declaration | ||
[36m/.../fixtures/uncurried_value_instead_of_curried_in_uncurried_mode.res[0m:[2m7:7-9[0m: | ||
Actual declaration |
5 changes: 5 additions & 0 deletions
5
.../build_tests/super_errors/fixtures/curried_value_instead_of_uncurried_in_curried_mode.res
This file contains hidden or 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,5 @@ | ||
module Foo: { | ||
let add: (. int, int) => int | ||
} = { | ||
let add = (a, b) => a + b | ||
} |
8 changes: 8 additions & 0 deletions
8
...uild_tests/super_errors/fixtures/curried_value_instead_of_uncurried_in_uncurried_mode.res
This file contains hidden or 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 @@ | ||
@@uncurried | ||
|
||
module Foo: { | ||
let add: (int, int) => int | ||
} = { | ||
@@uncurried.swap | ||
let add = (. a, b) => a + b | ||
} |
5 changes: 5 additions & 0 deletions
5
.../build_tests/super_errors/fixtures/uncurried_value_instead_of_curried_in_curried_mode.res
This file contains hidden or 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,5 @@ | ||
module Foo: { | ||
let add: (int, int) => int | ||
} = { | ||
let add = (. a, b) => a + b | ||
} |
8 changes: 8 additions & 0 deletions
8
...uild_tests/super_errors/fixtures/uncurried_value_instead_of_curried_in_uncurried_mode.res
This file contains hidden or 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 @@ | ||
@@uncurried | ||
|
||
module Foo: { | ||
@@uncurried.swap | ||
let add: (. int, int) => int | ||
} = { | ||
let add = (a, b) => a + b | ||
} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm unfortunately it doesn't work with this helper, maybe it's too restrictive? Like working only on function value not on signatures maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably needs expand head too first, forgot about that
Edit: scratch that, already done above