summary refs log tree commit diff
path: root/lib/options.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-23 18:20:39 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-23 20:08:22 +0200
commit6de7886fb80fde29437d8b519d6bbe743794deeb (patch)
treea030ffd1fc6aebed3c869261a686adbdda226b61 /lib/options.nix
parent0ec10c57df93f38b69df73ec1bb91457e657cb7b (diff)
downloadnixlib-6de7886fb80fde29437d8b519d6bbe743794deeb.tar
nixlib-6de7886fb80fde29437d8b519d6bbe743794deeb.tar.gz
nixlib-6de7886fb80fde29437d8b519d6bbe743794deeb.tar.bz2
nixlib-6de7886fb80fde29437d8b519d6bbe743794deeb.tar.lz
nixlib-6de7886fb80fde29437d8b519d6bbe743794deeb.tar.xz
nixlib-6de7886fb80fde29437d8b519d6bbe743794deeb.tar.zst
nixlib-6de7886fb80fde29437d8b519d6bbe743794deeb.zip
Slightly improve option type error messages
Diffstat (limited to 'lib/options.nix')
-rw-r--r--lib/options.nix9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/options.nix b/lib/options.nix
index efb32efc6356..b6a88008bb7a 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;