Open
Description
I’m currently working on creating bindings for nix library functions in dhall so that you can write more of your NixOS configuration in dhall and I have run into some friction surrounding the merge operator, as it is not translated correctly.
let Optional/default =
./default.dhall
sha256:5bd665b0d6605c374b3c4a7e2e2bd3b9c1e39323d41441149ed5e30d86e889ad
in λ(v : Optional Natural) → Optional/default Natural 0 v
is translated as
v:
v { None = 0; Some = _: _; }
and not as the working
v: if v != null then (_: _) v else 0
It generates the same code as normal unions, which is inappropriate because Some v
is mapped to v
and None t
is mapped to null
.
Metadata
Metadata
Assignees
Labels
No labels