From 79538b5bcb593cb2f6be4b03f78cc94de9e2e49b Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Thu, 14 Dec 2023 14:55:30 +0000 Subject: Remove spurious `builtins.` (#4086) I am just getting started, but believe this `builtins.` name spacing here can go --- nix.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nix.html.markdown') diff --git a/nix.html.markdown b/nix.html.markdown index 1d5a7778..cf412864 100644 --- a/nix.html.markdown +++ b/nix.html.markdown @@ -355,7 +355,7 @@ with builtins; [ # its contents. You can read files from anywhere. In this example, # we write a file into the store, and then read it back out. (let filename = toFile "foo.txt" "hello!"; in - [filename (builtins.readFile filename)]) + [filename (readFile filename)]) #=> [ "/nix/store/ayh05aay2anx135prqp0cy34h891247x-foo.txt" "hello!" ] # We can also download files into the Nix store. -- cgit v1.2.3 From c2ba7b321ff62e0a8c13c7f3fe012f0a15d901da Mon Sep 17 00:00:00 2001 From: Nathaniel W Griswold Date: Thu, 14 Dec 2023 09:13:20 -0600 Subject: [nix/en] Add `@` syntax to set pattern matching section (#4170) --- nix.html.markdown | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nix.html.markdown') diff --git a/nix.html.markdown b/nix.html.markdown index cf412864..c2a2c074 100644 --- a/nix.html.markdown +++ b/nix.html.markdown @@ -305,6 +305,9 @@ with builtins; [ ({x, y, ...}: x + "-" + y) { x = "a"; y = "b"; z = "c"; } #=> "a-b" + # The entire set can be bound to a variable using `@` + (args@{x, y}: args.x + "-" + args.y) { x = "a"; y = "b"; } + #=> "a-b" # Errors #========================================= -- cgit v1.2.3