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

Disambiguate fixity #2

Open
noughtmare opened this issue Jun 12, 2023 · 0 comments
Open

Disambiguate fixity #2

noughtmare opened this issue Jun 12, 2023 · 0 comments
Milestone

Comments

@noughtmare
Copy link
Owner

noughtmare commented Jun 12, 2023

Currently, when you write something like Plus <$> expr <* char '+' <*> expr <|> number and use that on the string 1+2+3 you'll get two results: Plus 1 (Plus 2 3) and Plus (Plus 1 2) 3.

We lack a way to specify which one of these should be chosen. Perhaps a notation like Plus <$> expr <* char '+' <<*> expr <|> number could force it to only return Plus (Plus 1 2) 3.

I don't have a clear idea of how to accomplish this in the algorithm.

@noughtmare noughtmare added this to the 1.0 milestone Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant