From c55427ca434d6791c2b1f146f1862f3d09f6800e Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Mon, 11 Mar 2019 22:56:56 +0100 Subject: 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. --- nixos/doc/manual/development/option-types.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos') 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"; }; 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 addCheck function - (), or to fully override the check function (). @@ -522,7 +522,7 @@ config.mod.two = { foo = 2; bar = "two"; }; byte = mkOption { description = "An integer between 0 and 255."; - type = addCheck types.int (x: x >= 0 && x <= 255); + type = types.addCheck types.int (x: x >= 0 && x <= 255); }; -- cgit 1.4.1