diff --git a/doc/manual/expressions/language-constructs.xml b/doc/manual/expressions/language-constructs.xml index fe69dba83..2f0027d47 100644 --- a/doc/manual/expressions/language-constructs.xml +++ b/doc/manual/expressions/language-constructs.xml @@ -333,7 +333,20 @@ with (import ./definitions.nix); ... makes all attributes defined in the file definitions.nix available as if they were defined -locally in a rec-expression. +locally in a let-expression. + +The bindings introduced by with do not shadow bindings +introduced by other means, e.g. + + +let a = 3; in with { a = 1; }; let a = 4; in with { a = 2; }; ... + +establishes the same scope as + + +let a = 1; in let a = 2; in let a = 3; in let a = 4; in ... + + diff --git a/doc/manual/expressions/language-operators.xml b/doc/manual/expressions/language-operators.xml index a3323ced4..f1f750934 100644 --- a/doc/manual/expressions/language-operators.xml +++ b/doc/manual/expressions/language-operators.xml @@ -40,6 +40,11 @@ weakest binding). Call function e1 with argument e2. + + - e + none + Arithmetic negation. + e ? attrpath @@ -55,13 +60,24 @@ weakest binding). List concatenation. - e1 + e2 + + e1 * e2, + e1 / e2 + left - String or path concatenation. + Arithmetic multiplication and division. + + + + e1 + e2, + e1 - e2 + + left + Arithmetic addition and subtraction. String or path concatenation (only by +). ! e - left + none Boolean negation. @@ -75,16 +91,22 @@ weakest binding). attributes). - e1 == - e2 + + e1 < e2, + e1 > e2, + e1 <= e2, + e1 >= e2 + none - Equality. + Arithmetic comparison. - e1 != - e2 + + e1 == e2, + e1 != e2 + none - Inequality. + Equality and inequality. e1 && diff --git a/doc/manual/expressions/language-values.xml b/doc/manual/expressions/language-values.xml index 67da688a4..bb2090c88 100644 --- a/doc/manual/expressions/language-values.xml +++ b/doc/manual/expressions/language-values.xml @@ -98,13 +98,17 @@ configureFlags = " Since ${ and '' have special meaning in indented strings, you need a way to quote them. - ${ can be escaped by prefixing it with + $ can be escaped by prefixing it with '' (that is, two single quotes), i.e., - ''${. '' can be escaped by + ''$. '' can be escaped by prefixing it with ', i.e., - '''. Finally, linefeed, carriage-return and - tab characters can be written as ''\n, - ''\r, ''\t. + '''. $ removes any special meaning + from the following $. Linefeed, carriage-return and tab + characters can be written as ''\n, + ''\r, ''\t, and ''\ + escapes any other character. + + Indented strings are primarily useful in that they allow multi-line string literals to follow the indentation of the