Nix Language Quirks: Difference between revisions
m propose merge |
m →No negative number literals: use "console" syntaxhighlight and "$" prefix for shell command |
||
| 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 | ||