From cc5b1b41fae3190f49d89c97747cbb31326d512e Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Thu, 8 Jun 2023 14:46:16 +0200 Subject: [PATCH] use the proposed `version` syntax in examples --- rfcs/0137-nix-language-version.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rfcs/0137-nix-language-version.md b/rfcs/0137-nix-language-version.md index 810fc45..0d7e044 100644 --- a/rfcs/0137-nix-language-version.md +++ b/rfcs/0137-nix-language-version.md @@ -513,13 +513,13 @@ nix --supported-language-versions ```nix # a.nix -use 6; +version 6; builtins.langVersion ``` ```nix # b.nix -use 7; +version 7; [ (import ./a.6.nix) builtins.langVersion ] ``` @@ -532,13 +532,13 @@ $ nix-instantiate --eval b.nix ```nix # a.nix -use 6; +version 6; import ./b.nix ``` ```nix # b.nix -use 7; +version 7; builtins.langVersion ``` @@ -552,14 +552,14 @@ error: unsupported Nix language version 7 ```nix # a.nix -use 6; +version 6; { increment }: increment 1 ``` ```nix # b.nix -use 7; +version 7; import ./a.nix { increment = x: x + 1 } ``` @@ -577,7 +577,7 @@ When passing values from newer versions to functions from older versions of the ```nix # a.nix -use 6; +version 6; { value }: value + 1 ``` @@ -586,7 +586,7 @@ Here we pretend that langauge version 7 introduced a new value type and syntax f ```nix # b.nix -use 7; +version 7; import ./a.nix { value = %5 + 7i%; } ```