-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Reproductions of poor error messages #4314
Labels
error-messages
Related to the quality of error messages
Comments
ReproductionCode: app "main"
packages { pf: "./roc/examples/cli/cli-platform/main.roc" }
imports [pf.Program, pf.Stdout, pf.Task]
provides [main] to pf
main =
Task.attempt processTask \p ->
when p is
Ok s -> Stdout.line s
Err ReadErr -> Stdout.line "Tried to read"
# Err WriteErr -> Stdout.line "Tried to write"
|> Program.quick
processTask : Task.Task Str [ReadErr, WriteErr] []* Error message:
|
Reproduction
And the compiler hang also |
Reproduction
|
lukewilliamboswell
added
the
error-messages
Related to the quality of error messages
label
Aug 14, 2024
ReproductionCode: collatzStep = \number, stepCount ->
if number == 1 then
(number, stepCount)
# else
if Num.isEven number then
collatzStep (number // 2) (stepCount + 1)
else
collatzStep (number * 3 + 1) (stepCount + 1)
Error message:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have some projects around improving the quality of error messages in type mismatches:
when
condition type doesn't match branch patterns #4007This issue is a bulletin board to collect reproductions of poor error messages so that we have test cases for improvements!
When listing a reproduction, please title your comment with
# Reproduction
(so that it stands out) and please provide a minimal reproduction of the test case! If your reproduction comes from another issue, you can instead link to that issue.Examples:
Reproduction comment
Reproduction
Code:
Error message:
Reproduction comment linking to issue
Reproduction
#4007
The text was updated successfully, but these errors were encountered: