Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upIs infix priority of (!) correct? #638
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cobalamin
Jul 18, 2016
Judging from http://faq.elm-community.org/operators.html, I'd say it should have a declaration of:
infixl 1 !
to work with everything up to and including ||, but still be lower precedence than |>/<|.
You can declare this in your own code somewhere, which seems a bit off to me, but it works. That declaration would break as soon as (!) gets its own associativity/precedence declaration in core, though.
cobalamin
commented
Jul 18, 2016
|
Judging from http://faq.elm-community.org/operators.html, I'd say it should have a declaration of:
to work with everything up to and including You can declare this in your own code somewhere, which seems a bit off to me, but it works. That declaration would break as soon as (!) gets its own associativity/precedence declaration in core, though. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jul 10, 2017
Member
The current plan is to drop (!) but I agree that if it ends up in 0.19 it should have a very low precedence, possibly such that it'll work with (|>) chains.
|
The current plan is to drop |
evancz
closed this
Jul 10, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
MartinKavik
May 7, 2018
Just note:
Some ideas for infix operator precedence (including !) - https://discourse.elm-lang.org/t/infix-operators-lower-precedence-than-and/1235
MartinKavik
commented
May 7, 2018
|
Just note: |
jinjor commentedJun 3, 2016
I tired to expand the counter example to use
programinstead ofbeginnerProgram. I added empty command inupdatefunction, and got this error message. Is this a correct behavior?I assumed
model + 1should be evaluated first.But it's trivial anyway. Adding a pair of parens fixes it.