-
Notifications
You must be signed in to change notification settings - Fork 187
refactor(compiler): improve clarity of common type error messages #1536
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
Open
sqrew
wants to merge
8
commits into
carp-lang:master
Choose a base branch
from
sqrew:fix/compiler-error-message-refinement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ceb4787
refactor(compiler): improve clarity of common type error messages
sqrew bab7b9b
refactor(compiler): update machineReadableErrorStrings for consistency
sqrew d458144
refactor(compiler): comprehensive type error refinements
sqrew 7f9b0bc
made the thigny work right, removed stray blank line
sqrew 2479f2c
Merge branch 'master' into fix/compiler-error-message-refinement
sqrew a922182
accidentally left an unused variable named original, removed it
sqrew 3df40f9
changed a line to use backticks
sqrew d9bfdb1
refactor(compiler): remove redundant variable name tracking in Memory.hs
sqrew 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/duplicate_binding.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| duplicate_binding.carp:5:9 Duplicate binding `x` inside `let`. | ||
| duplicate_binding.carp:5:9 Duplicate binding `x` inside `let`. Each name in a `let` must be unique. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/lambda_capturing_ref_that_dies.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| lambda_capturing_ref_that_dies.carp:8:6 The reference 'f' isn't alive. | ||
| lambda_capturing_ref_that_dies.carp:8:6 The reference 'f' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/lifetime_sig_dangling_ref.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| lifetime_sig_dangling_ref.carp:5:33 The reference '(ref local)' isn't alive. | ||
| lifetime_sig_dangling_ref.carp:5:33 The reference '(ref local)' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/return_ref_in_do.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| return_ref_in_do.carp:4:3 The reference '(do () () () () (ref [1 2 3]))' isn't alive. | ||
| return_ref_in_do.carp:4:3 The reference '(do () () () () (ref [1 2 3]))' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/return_ref_in_let.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| return_ref_in_let.carp:5:5 The reference 'xs' isn't alive. | ||
| return_ref_in_let.carp:5:5 The reference 'xs' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/return_ref_to_array_literal.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| return_ref_to_array_literal.carp:4:4 The reference '(ref [1 2 3])' isn't alive. | ||
| return_ref_to_array_literal.carp:4:4 The reference '(ref [1 2 3])' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/return_ref_to_function_result.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| return_ref_to_function_result.carp:7:4 The reference '(ref (make-data))' isn't alive. | ||
| return_ref_to_function_result.carp:7:4 The reference '(ref (make-data))' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/set_ref_outlives_in_do.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| set_ref_outlives_in_do.carp:10:15 The reference 'x' isn't alive. | ||
| set_ref_outlives_in_do.carp:10:15 The reference 'x' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/set_ref_outlives_multiple.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| set_ref_outlives_multiple.carp:11:15 The reference 'x' isn't alive. | ||
| set_ref_outlives_multiple.carp:11:15 The reference 'x' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/set_ref_outlives_nested.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| set_ref_outlives_nested.carp:9:15 The reference 'x' isn't alive. | ||
| set_ref_outlives_nested.carp:9:15 The reference 'x' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/set_ref_outlives_source.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| set_ref_outlives_source.carp:10:15 The reference 'x' isn't alive. | ||
| set_ref_outlives_source.carp:10:15 The reference 'x' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/set_ref_outlives_string_copy.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| set_ref_outlives_string_copy.carp:8:15 The reference 'x' isn't alive. | ||
| set_ref_outlives_string_copy.carp:8:15 The reference 'x' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/set_ref_outlives_via_call.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| set_ref_outlives_via_call.carp:10:15 The reference 'x' isn't alive. | ||
| set_ref_outlives_via_call.carp:10:15 The reference 'x' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/use_ref_after_free.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| use_ref_after_free.carp:7:17 The reference 'r' isn't alive. | ||
| use_ref_after_free.carp:7:17 The reference 'r' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/use_ref_arg_after_free.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| use_ref_arg_after_free.carp:6:17 The reference 'r' isn't alive. | ||
| use_ref_arg_after_free.carp:6:17 The reference 'r' is no longer valid. |
2 changes: 1 addition & 1 deletion
2
test/output/test/test-for-errors/use_ref_via_nth_after_free.carp.output.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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| use_ref_via_nth_after_free.carp:9:19 The reference 'q' isn't alive. | ||
| use_ref_via_nth_after_free.carp:9:19 The reference 'q' is no longer valid. |
Oops, something went wrong.
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.
We should use either
'or `, not both.