dhall-lang / dhall-nix

This repository has moved to https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-nix
BSD 3-Clause "New" or "Revised" License
89 stars 4 forks source link

Could lib.recursiveUpdate be used for (∧)? #1

Closed 8573 closed 7 years ago

8573 commented 7 years ago

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.

Gabriella439 commented 7 years ago

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>