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

Operators bind tighter than function application #30

Open
jstolarek opened this issue Feb 15, 2017 · 1 comment
Open

Operators bind tighter than function application #30

jstolarek opened this issue Feb 15, 2017 · 1 comment

Comments

@jstolarek
Copy link
Owner

If I say

fst (raise "foo") + 2

this parses as fst ((raise "foo") + 2) rather than (fst (raise "foo")) + 2. I've run into similar issues several times before. The problem is that operators bind tighter than application but it should be the other way around. Perhaps this can be solved by modifying the parser. If not then we might need a separate pass to restore correct operator precedence (I think GHC does something like that).

@jstolarek jstolarek added the bug label Feb 15, 2017
@jstolarek jstolarek changed the title Applications parse incorrectly Operators bind tighter than function application Feb 15, 2017
@jamescheney
Copy link
Collaborator

Ugh, yeah. I now remember running into this and thinking it would be good to fix sometime...

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