From e8e0d1665ca18214ad751171d4920893400fa472 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Thu, 12 Jun 2008 06:58:07 +0000 Subject: [PATCH] traceWhatIs works for empty lists svn path=/nixpkgs/trunk/; revision=12046 --- pkgs/lib/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix index 2efd1adddb10..af2785f30e54 100644 --- a/pkgs/lib/default.nix +++ b/pkgs/lib/default.nix @@ -341,6 +341,7 @@ rec { if (x ? outPath) then "x is a derivation with name ${x.name}" else "x is an attr set with attributes ${builtins.toString (__attrNames x)}" else if (__isFunction x) then "x is a function" + else if (x == []) then "x is an empty list" else if (__isList x) then "x is a list, first item is : ${whatis (__head x)}" else if (x == true || x == false) then builtins.toString x else "x is probably a string starting, starting characters: ${__substring 0 50 x}..";