Reading the part of the blog post Typed Nix programming using Dhall
on how Dhall's (∧) operator is translated to Nix, I wondered whether
it could use the Nix standard library function lib.recursiveUpdate
— or (lib.flip lib.recursiveUpdate), as it looks to me like the
generated code has the first argument's key-value pairs override those
of the second argument (where they aren't sets to recursively merge),
whereas lib.recursiveUpdate gives precedence to the second argument.
Yeah, I can definitely fix it to match the precedence of lib.recursiveUpdate. I still prefer to implement it inline mainly because I don't want the generated code to depend on <nixpkgs>
Reading the part of the blog post Typed Nix programming using Dhall on how Dhall's (∧) operator is translated to Nix, I wondered whether it could use the Nix standard library function
lib.recursiveUpdate
— or(lib.flip lib.recursiveUpdate)
, as it looks to me like the generated code has the first argument's key-value pairs override those of the second argument (where they aren't sets to recursively merge), whereaslib.recursiveUpdate
gives precedence to the second argument.