From 6de7886fb80fde29437d8b519d6bbe743794deeb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 23 Oct 2013 18:20:39 +0200 Subject: Slightly improve option type error messages --- lib/options.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/options.nix') diff --git a/lib/options.nix b/lib/options.nix index efb32efc6356f..b6a88008bb7a3 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -11,10 +11,7 @@ with import ./properties.nix; rec { - inherit (lib) isType; - - - isOption = isType "option"; + isOption = lib.isType "option"; mkOption = attrs: attrs // { _type = "option"; # name (this is the name of the attributem it is automatically generated by the traversal) @@ -66,7 +63,7 @@ rec { if all opt.check list then opt.merge list else - throw "One of option ${name} values has a bad type."; + throw "A value of the option `${name}' has a bad type."; } else opt; @@ -77,7 +74,7 @@ rec { if opt.check opt.default then opt.default else - throw "The default value of option ${name} has a bad type."; + throw "The default value of the option `${name}' has a bad type."; } else opt; -- cgit 1.4.1