diff options
author | Nicolas Pierron <nicolas.b.pierron@gmail.com> | 2009-06-26 12:42:00 +0000 |
---|---|---|
committer | Nicolas Pierron <nicolas.b.pierron@gmail.com> | 2009-06-26 12:42:00 +0000 |
commit | dd50af4923a71461262f3113022548edff545b79 (patch) | |
tree | 861809e1cc542e6023f419588b29fbf2f2cb2989 /pkgs/lib/debug.nix | |
parent | c69010d6eb67db58aaf96aa40b0ae96dfc4dcbb7 (diff) | |
download | nixpkgs-dd50af4923a71461262f3113022548edff545b79.tar nixpkgs-dd50af4923a71461262f3113022548edff545b79.tar.gz nixpkgs-dd50af4923a71461262f3113022548edff545b79.tar.bz2 nixpkgs-dd50af4923a71461262f3113022548edff545b79.tar.lz nixpkgs-dd50af4923a71461262f3113022548edff545b79.tar.xz nixpkgs-dd50af4923a71461262f3113022548edff545b79.tar.zst nixpkgs-dd50af4923a71461262f3113022548edff545b79.zip |
Add a description of values which cause a bad type the failure.
svn path=/nixpkgs/trunk/; revision=16054
Diffstat (limited to 'pkgs/lib/debug.nix')
-rw-r--r-- | pkgs/lib/debug.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix index 18b5e1db9d4..c05f540e503 100644 --- a/pkgs/lib/debug.nix +++ b/pkgs/lib/debug.nix @@ -43,6 +43,8 @@ rec { traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); traceCall3 = n : f : a : b : c : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c)); + traceValIfNot = c: x: + if c x then true else trace (showVal x) false; /* Evaluate a set of tests. A test is an attribute set {expr, expected}, denoting an expression and its expected result. The |