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

Confusing error: "Standard constructors are never updatable, expected: atom (variable or literal)" #88

Closed
tomjaguarpaw opened this issue Aug 6, 2016 · 1 comment

Comments

@tomjaguarpaw
Copy link

I wrote this program:

one :: Program
one = mconcat
    [ [program|
    main = \ => Int# 1#
    |]]

The error was

error: Standard constructors are never updatable, expected: atom (variable or literal)
    <EOF> 
    ^

which was extremely puzzling. I only discovered that I should use -> instead of => by looking around for other example programs.

@quchen
Copy link
Owner

quchen commented Aug 9, 2016

Good catch! This is a case where the parser does a (tiny) bit of static code analysis. I’ll have to figure out how to supporess “expected...got” messages in Trifecta, because fixing this should involve two things: a better error message hinting at the kind of arrow, and no suggestion of an “expected atom”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants