dhall-nix-lib/runtime.nix

16 lines
510 B
Nix

lib: {
primops = {
equal = a: b: a == b;
fix = _: f: let x = f x; in x;
fix' = f: let x = f x // { __unfix__ = f; }; in x;
ignoreOtherArgs = _: _: f: let
args = lib.trivial.functionArgs f;
filterFunction = k: _: builtins.hasAttrs k set;
filteredFunction = s: f (lib.attrsets.filterAttrs filterFunction s);
in lib.trivial.setFunctionArgs filteredFunction args;
mergeAttrs = a: b: a // b;
toAny = _: v: v;
toTypeUnchecked = _: v: v;
};
inherit builtins;
}