From 18520b7f3658f2007c7cbfcaea43edf2becdbb86 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 23 Jan 2020 01:07:02 +0100 Subject: lib/generators: floats are not supported in mkValueStringDefault They are cut off after a few decimal places; we cannot in good faith define a default string representation with that. --- lib/generators.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/generators.nix b/lib/generators.nix index a71654bec6c36..a64e94bd5cbdf 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -46,7 +46,10 @@ rec { else if isList v then err "lists" v # same as for lists, might want to replace else if isAttrs v then err "attrsets" v + # functions can’t be printed of course else if isFunction v then err "functions" v + # let’s not talk about floats. There is no sensible `toString` for them. + else if isFloat v then err "floats" v else err "this value is" (toString v); -- cgit 1.4.1