Skip to content
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

Improve parsing and error message for curried function missing parens #7129

Open
lukewilliamboswell opened this issue Sep 29, 2024 · 0 comments
Labels
bug Something isn't working error-messages Related to the quality of error messages parsing

Comments

@lukewilliamboswell
Copy link
Collaborator

The following gives a cryptic error message. The curried function should include parens, but they are missing. This is difficult for users to spot unless they are already very familiar with the syntax (in which case they may never see this error).

module [main]

main : U8 -> _ -> Task U8 _

# should be, works ok
# main : U8 -> (_ -> Task U8 _)
$ roc check example.roc
── SYNTAX PROBLEM in example.roc ───────────────────────────────────────────────

I got stuck here:

1│  module [main]
2│
3│  main : U8 -> _ -> Task U8 _
                  ^

Whatever I am running into is confusing me a lot! Normally I can give
fairly specific hints, but something is really tripping me up this
@lukewilliamboswell lukewilliamboswell added bug Something isn't working parsing error-messages Related to the quality of error messages labels Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error-messages Related to the quality of error messages parsing
Projects
None yet
Development

No branches or pull requests

1 participant