3
0
Fork 0
forked from mirrors/nixpkgs

manual: Fix addCheck example having arguments in wrong order.

`addCheck` takes first the type, then the check.
This commit is contained in:
Niklas Hambüchen 2017-05-21 15:03:16 +02:00
parent 6f7347ec58
commit 2df7d4d63a

View file

@ -282,7 +282,7 @@ config.mod.two = { foo = 2; bar = "two"; };</screen></example>
<screen>
byte = mkOption {
description = "An integer between 0 and 255.";
type = addCheck (x: x &gt;= 0 &amp;&amp; x &lt;= 255) types.int;
type = addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
};</screen></example>
<example xml:id='ex-extending-type-check-2'><title>Overriding a type