From 30503958109f3282ca557fbf1fd62dec1fefe0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoran=20Plesiv=C4=8Dak?= Date: Wed, 1 Nov 2017 21:31:20 +0000 Subject: [PATCH 1/2] Mention "float" type in builtins.typeOf section of the docs + remove trailing whitespace from the file --- doc/manual/expressions/builtins.xml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/manual/expressions/builtins.xml b/doc/manual/expressions/builtins.xml index 615314880..14da1c63e 100644 --- a/doc/manual/expressions/builtins.xml +++ b/doc/manual/expressions/builtins.xml @@ -264,13 +264,13 @@ stdenv.mkDerivation { … } Note that when obtaining the hash with nix-prefetch-url the option --unpack is required. - - - This function can also verify the contents against a hash. - In that case, the function takes a set instead of a URL. The set + + + This function can also verify the contents against a hash. + In that case, the function takes a set instead of a URL. The set requires the attribute url and the attribute sha256, e.g. - + with import (fetchTarball { url = https://github.com/NixOS/nixpkgs-channels/archive/nixos-14.12.tar.gz; @@ -279,7 +279,7 @@ with import (fetchTarball { stdenv.mkDerivation { … } - + This function is not available if e, namely "int", "bool", "string", "path", "null", - "set", "list" or - "lambda". + "set", "list", + "lambda" or + "float". From ae506c1ea420ed2411493d5178a3356219e1c252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoran=20Plesiv=C4=8Dak?= Date: Wed, 1 Nov 2017 23:00:08 +0000 Subject: [PATCH 2/2] Mention isFloat function in "Built-in Functions" section --- doc/manual/expressions/builtins.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/manual/expressions/builtins.xml b/doc/manual/expressions/builtins.xml index 14da1c63e..5e88b8856 100644 --- a/doc/manual/expressions/builtins.xml +++ b/doc/manual/expressions/builtins.xml @@ -600,6 +600,16 @@ x: x + 456 + builtins.isFloat + e + + Return true if + e evaluates to a float, and + false otherwise. + + + + builtins.isBool e