diff options
Diffstat (limited to 'doc/manual/nix-lang-ref.xml')
-rw-r--r-- | doc/manual/nix-lang-ref.xml | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/doc/manual/nix-lang-ref.xml b/doc/manual/nix-lang-ref.xml index bda0ff5432db..86273ac3d016 100644 --- a/doc/manual/nix-lang-ref.xml +++ b/doc/manual/nix-lang-ref.xml @@ -178,100 +178,5 @@ </productionset> </sect1> - - - - <sect1> - <title>Semantics</title> - - - - <sect2> - <title>Built-in functions</title> - - <para> - The Nix language provides the following built-in function - (<quote>primops</quote>): - </para> - - <variablelist> - - <varlistentry> - <term><function>import</function> - <replaceable>e</replaceable></term> - <listitem> - <para> - Evaluates the expression <replaceable>e</replaceable>, - which must yield a path value. The Nix expression - stored at this path in the file system is then read, - parsed, and evaluated. Returns the result of the - evaluation of the Nix expression just read. - </para> - - <para> - Example: <literal>import ./foo.nix</literal> evaluates - the expression stored in <filename>foo.nix</filename> - (in the directory containing the expression in which the - <function>import</function> occurs). - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><function>derivation</function> - <replaceable>e</replaceable></term> - <listitem> - <para> - Evaluates the expression <replaceable>e</replaceable>, - which must yield an attribute set. [...] - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><function>baseNameOf</function> - <replaceable>e</replaceable></term> - <listitem> - <para> - Evaluates the expression <replaceable>e</replaceable>, - which must yield a string value, and returns a string - representing its <emphasis>base name</emphasis>. This - is the substring following the last path separator - (<literal>/</literal>). - </para> - - <para> - Example: <literal>baseNameOf "/foo/bar"</literal> - returns <literal>"bar"</literal>, and - <literal>baseNameOf "/foo/bar/"</literal> returns - <literal>""</literal>. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><function>toString</function> - <replaceable>e</replaceable></term> - <listitem> - <para> - Evaluates the expression <replaceable>e</replaceable> - and coerces it into a string, if possible. Only - strings, paths, and URIs can be so coerced. - </para> - - <para> - Example: <literal>toString - http://www.cs.uu.nl/</literal> returns - <literal>"http://www.cs.uu.nl/"</literal>. - </para> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - - </sect1> - </appendix> |