diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-02-09 16:51:03 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-02-09 16:51:03 +0000 |
commit | 599015e8b071bc8d38779fbfc37961db1ac0f464 (patch) | |
tree | 12cfb8ef316f4021ef81d135a5c331804a817809 /pkgs/lib/debug.nix | |
parent | eebb6f106c445c5661975a60a55b07ad91c6fa47 (diff) | |
download | nixpkgs-599015e8b071bc8d38779fbfc37961db1ac0f464.tar nixpkgs-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.gz nixpkgs-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.bz2 nixpkgs-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.lz nixpkgs-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.xz nixpkgs-599015e8b071bc8d38779fbfc37961db1ac0f464.tar.zst nixpkgs-599015e8b071bc8d38779fbfc37961db1ac0f464.zip |
* Split lib/default.nix into several files, as it had become a big
mess. Also cleaned up some functions: - foldl appeared broken (it recursively called fold). - Renamed logicalAND/logicalOR to and/or. - Removed listOfListsToAttrs, eqStrings: obsolete. - Removed isInList, which does the same thing as elem. - stringToCharacters: don't return a "" at the end of the list. - Renamed concatList to concat, as concatList (singular) is a misnomer: it takes two lists. Likewise, renamed mergeAttr to mergeAttrs. misc.nix still contains a lot of stuff that should be refactored and moved to other files. svn path=/nixpkgs/trunk/; revision=14013
Diffstat (limited to 'pkgs/lib/debug.nix')
-rw-r--r-- | pkgs/lib/debug.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix new file mode 100644 index 00000000000..23d1a85c72f --- /dev/null +++ b/pkgs/lib/debug.nix @@ -0,0 +1,15 @@ +rec { + + + # Wrapper aroung the primop `addErrorContext', which shouldn't used + # directly. It evaluates and returns `val', but if an evaluation + # error occurs, the text in `msg' is added to the error context + # (stack trace) printed by Nix. + addErrorContext = + if builtins ? addErrorContext + then builtins.addErrorContext + else msg: val: val; + + + +} \ No newline at end of file |