-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dhall-to-nix: Encode unions slightly differently for better symbol
Symbols in nix can only consist of a very restricted amount of characters, whereas in dhall they can be basically anything. When you want to get a value of a union, before it was generated into ``` { Foo, Bar }: Foo ``` where `Foo` cannot be a complex symbol like `{ Foo/Baz, Bar }: Foo/Baz`, because nix does not allow it in anonymous record arguments. So now we generate it as ``` u: u."Foo/Baz" ``` which should always work and is equal (though it loses the information of what other fields are there in the nix code). Before I faultily encoded some of these symbols with a Z-encoding, but that was wrong, so it was undone.
- Loading branch information
1 parent
09131de
commit 2f24a71
Showing
1 changed file
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters