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: document exact precedence, split up similar operators #3056

Merged
merged 2 commits into from Aug 27, 2019

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Aug 23, 2019

@joepie91
Copy link

joepie91 commented Aug 23, 2019

Hmm, I think this would benefit from clarifying the order of the precedence (lowest = strongest) given that it wouldn't be obviously one way or the other, and possibly also how the associativity plays into it. I don't know whether the phrase from the original gist would fit in here, though.

Happy to see the changes, though :)

@zimbatm
Copy link
Member

zimbatm commented Aug 24, 2019

There is also [] which is just between SELECT and APP.

nix-repl> a = { b = 4; }
nix-repl> [ a.b ]
[ 4 ]
nix-repl> foo = x: x*x
nix-repl> [ foo 4 ]
[ «lambda @ (string):1:2» 4 ]
nix-repl> [ -4 ]
error: syntax error, unexpected '-', at (string):1:3

@grahamc
Copy link
Member Author

grahamc commented Aug 24, 2019 via email

@grahamc
Copy link
Member Author

grahamc commented Aug 24, 2019 via email

@joepie91
Copy link

Oh, right, that bit wasn't visible in the diff. My bad :)

@edolstra edolstra merged commit 177e574 into NixOS:master Aug 27, 2019
@grahamc grahamc deleted the operators branch August 27, 2019 15:13
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

Successfully merging this pull request may close these issues.

None yet

4 participants