about summary refs log tree commit diff
path: root/nixos/doc/manual/development
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2019-03-11 22:56:56 +0100
committerAndreas Rammhold <andreas@rammhold.de>2019-03-11 22:56:56 +0100
commitc55427ca434d6791c2b1f146f1862f3d09f6800e (patch)
treea075c5c72fd589d0289bd40f6cac8f1abcf686a9 /nixos/doc/manual/development
parent6fa3dd2d5a3fb548410149bf3d65921a129a88c2 (diff)
downloadnixlib-c55427ca434d6791c2b1f146f1862f3d09f6800e.tar
nixlib-c55427ca434d6791c2b1f146f1862f3d09f6800e.tar.gz
nixlib-c55427ca434d6791c2b1f146f1862f3d09f6800e.tar.bz2
nixlib-c55427ca434d6791c2b1f146f1862f3d09f6800e.tar.lz
nixlib-c55427ca434d6791c2b1f146f1862f3d09f6800e.tar.xz
nixlib-c55427ca434d6791c2b1f146f1862f3d09f6800e.tar.zst
nixlib-c55427ca434d6791c2b1f146f1862f3d09f6800e.zip
nixos/doc: add `types` prefix to `addCheck` example
The function `addCheck` resides within the attrset `types`. We should be
explicit about this since otherwise people might be confused where it
does come from / why it doesn't work for them.
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r--nixos/doc/manual/development/option-types.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml
index d993e47bc914..069cc36573d8 100644
--- a/nixos/doc/manual/development/option-types.xml
+++ b/nixos/doc/manual/development/option-types.xml
@@ -512,7 +512,7 @@ config.mod.two = { foo = 2; bar = "two"; };</screen>
       The function to type check the value. Takes a value as parameter and
       return a boolean. It is possible to extend a type check with the
       <literal>addCheck</literal> function
-      (<xref 
+      (<xref
           linkend='ex-extending-type-check-1' />), or to fully
       override the check function
       (<xref linkend='ex-extending-type-check-2' />).
@@ -522,7 +522,7 @@ config.mod.two = { foo = 2; bar = "two"; };</screen>
 <screen>
 byte = mkOption {
   description = "An integer between 0 and 255.";
-  type = addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
+  type = types.addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
 };</screen>
      </example>
      <example xml:id='ex-extending-type-check-2'>