···
···
## -- HELPER FUNCTIONS & DEFAULTS --
···
toDconfINI = toINI { mkKeyValue = mkDconfKeyValue; };
305
-
/* Generates JSON from an arbitrary (non-function) value.
306
-
* For more information see the documentation of the builtin.
308
-
toJSON = {}: builtins.toJSON;
311
-
/* YAML has been a strict superset of JSON since 1.2, so we
312
-
* use toJSON. Before it only had a few differences referring
313
-
* to implicit typing rules, so it should work with older
/* If this option is not null, the given value will stop evaluating at a certain depth */
···
abort "generators.toDhall: cannot convert a null to Dhall"
Translate a simple Nix expression to Lua representation with occasional
···
else if isInt v || isFloat v || isString v || isBool v then
(if v == [ ] then "{}" else
"{${introSpace}${concatItems (map (value: "${toLua innerArgs value}") v)}${outroSpace}}")
···
"{${introSpace}${concatItems (
583
-
mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v
568
+
mapAttrsToList (key: value: "[${toJSON key}] = ${toLua innerArgs value}") v
···
mkLuaInline :: String -> AttrSet
mkLuaInline = expr: { _type = "lua-inline"; inherit expr; };
584
+
# Everything in this attrset is the public interface of the file.
590
+
mkValueStringDefault
595
+
toINIWithGlobalSection
603
+
/* Generates JSON from an arbitrary (non-function) value.
604
+
* For more information see the documentation of the builtin.
606
+
toJSON = {}: toJSON;
608
+
/* YAML has been a strict superset of JSON since 1.2, so we
609
+
* use toJSON. Before it only had a few differences referring
610
+
* to implicit typing rules, so it should work with older
613
+
toYAML = {}: toJSON;