Nix Language Quirks: Difference between revisions
Some formatting changes and link to a separate quirk list |
m →No negative number literals: use "console" syntaxhighlight and "$" prefix for shell command |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{merge|Nix | {{merge|Nix (language)}} | ||
== <code>with</code> and <code>let</code> == | == <code>with</code> and <code>let</code> == | ||
| Line 153: | Line 153: | ||
Negative numbers are parsed as "zero minus positive" | Negative numbers are parsed as "zero minus positive" | ||
< | <syntaxhighlight lang="console"> | ||
nix-instantiate --parse --expr '(-1)' | $ nix-instantiate --parse --expr '(-1)' | ||
(__sub 0 1) | (__sub 0 1) | ||
</ | </syntaxhighlight> | ||
So this throws, because the positive number is out of range | So this throws, because the positive number is out of range | ||