Keep position information for option declarations and definitions

Also, when an option definition fails to type-check, print the file
name of the module in which the offending definition occurs, e.g.

  error: user-thrown exception: The option value `boot.loader.grub.version' in `/etc/nixos/configuration.nix' is not a integer.
This commit is contained in:
Eelco Dolstra
2013-10-28 22:45:55 +01:00
parent cfab329437
commit 40913958a2
3 changed files with 86 additions and 43 deletions
+1 -1
View File
@@ -240,7 +240,7 @@ rec {
# names, hopefully this does not affect the system because the maximal
# laziness avoid computing twice the same expression and listToAttrs does
# not care about duplicated attribute names.
zipAttrsWith = f: sets: zipWithNames (concatMap attrNames sets) f sets;
zipAttrsWith = f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets;
zipAttrs = zipAttrsWith (name: values: values);