lib.toC: admit int
This commit is contained in:
parent
853e54ec84
commit
d7edeeac50
@ -52,6 +52,7 @@ let
|
|||||||
type = typeOf x;
|
type = typeOf x;
|
||||||
reject = throw "cannot convert ${type}";
|
reject = throw "cannot convert ${type}";
|
||||||
in {
|
in {
|
||||||
|
int = toJSON x; # close enough
|
||||||
list = "{ ${concatStringsSep ", " (map toC x)} }";
|
list = "{ ${concatStringsSep ", " (map toC x)} }";
|
||||||
null = "NULL";
|
null = "NULL";
|
||||||
set = if isDerivation x then toJSON x else reject;
|
set = if isDerivation x then toJSON x else reject;
|
||||||
|
Loading…
Reference in New Issue
Block a user