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

Parsing of type operators isn't quite right #2092

Closed
garyb opened this issue May 5, 2016 · 6 comments
Closed

Parsing of type operators isn't quite right #2092

garyb opened this issue May 5, 2016 · 6 comments
Assignees
Milestone

Comments

@garyb
Copy link
Member

garyb commented May 5, 2016

They bind too tightly,

StateF s ~> StateF s'

is not parsed as:

(StateF s) ~> (StateF s')

but instead something like:

StateF (s ~> StateF) s'
@garyb garyb added this to the 0.9.0 milestone May 5, 2016
@paf31
Copy link
Contributor

paf31 commented May 5, 2016

On a related note, does it make sense to have -> be an infix synonym for Function so that users can assign precedences lower than it?

@garyb
Copy link
Member Author

garyb commented May 5, 2016

Yeah, I think so :). We'd want to keep the special handling in the pretty printer, I assume that wouldn't be a problem?

@paf31
Copy link
Contributor

paf31 commented May 5, 2016

Why keep the special handling?

@paf31
Copy link
Contributor

paf31 commented May 5, 2016

Oh, printer, sorry. Yes.

@garyb
Copy link
Member Author

garyb commented May 5, 2016

What do you think the precedence should be for (->)?

@paf31
Copy link
Contributor

paf31 commented May 5, 2016

Hmm, not sure. Something low but not zero.

paf31 added a commit that referenced this issue May 8, 2016
@paf31 paf31 self-assigned this May 8, 2016
paf31 added a commit that referenced this issue May 8, 2016
* Fix #2092, precedence of type application

* one more test
@paf31 paf31 closed this as completed May 8, 2016
@paf31 paf31 mentioned this issue May 22, 2016
19 tasks
archaeron pushed a commit to archaeron/purescript that referenced this issue Apr 6, 2017
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