1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-19 04:00:13 -04:00

Update Attribute sets example and remove obsolete note

The attribute name is quoted correctly by the REPL
in nix 2.1.3.
This commit is contained in:
Olli Helenius 2018-12-10 20:51:14 +02:00
parent 500b723563
commit 0da536fa39
2 changed files with 1 additions and 7 deletions

View file

@ -211,12 +211,6 @@
<screen><xi:include href="./04/set-basics.txt" parse="text" /></screen>
<note><para>
Here the string representation printed in the repl is wrong, you can't write
<literal>{ 123 = "num"; }</literal>, because 123 is not an identifier. You also need a semicolon
(<literal>;</literal>) after every key-value assignment.
</para></note>
<para>
For those reading Nix expressions from nixpkgs: do not confuse attribute sets with
argument sets used in functions.

View file

@ -1,3 +1,3 @@
nix-repl> s = { foo = "bar"; a-b = "baz"; "123" = "num"; }
nix-repl> s
{ 123 = "num"; a-b = "baz"; foo = "bar"; }
{ "123" = "num"; a-b = "baz"; foo = "bar"; }