Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Natural/showHex builtin #2538

Closed
wants to merge 2 commits into from
Closed

Add Natural/showHex builtin #2538

wants to merge 2 commits into from

Conversation

kukimik
Copy link
Collaborator

@kukimik kukimik commented Sep 30, 2023

Implementation of dhall-lang/dhall-lang#1351.

Mostly copy-pasted from 3aadd57.

  • Unfortunately I don't know nix and I wasn't able to add a proper nix interpretation of showHex in dhall-nix/src/Dhall/Nix.hs. I've found something called lib.trivial.toHexString, but this probably can't be used directly.
  • I don't know if (and how/at which moment) I should update the dhall/dhall-lang subrepo.

@kukimik
Copy link
Collaborator Author

kukimik commented Oct 12, 2023

Unfortunately I don't know nix and I wasn't able to add a proper nix interpretation of showHex in dhall-nix/src/Dhall/Nix.hs. I've found something called lib.trivial.toHexString, but this probably can't be used directly.

I've learnt enough nix to write this function down 🎉 (which turned out to be rather easy), now I just need to find a moment to hnix-ify it.

@kukimik
Copy link
Collaborator Author

kukimik commented Oct 16, 2023

I added a nix translation of Natural/showHex. I don't really like the elemAt approach; I'd rather do it like this, but I didn't have the time to dig through hnix's Antiquotes. Perhaps the current solution is good enough.

@Gabriella439
Copy link
Collaborator

Just FYI: I'm probably going to cut a release of the Haskell implementation before merging this and the corresponding dhall-lang PR, just because I'm a bit overdue on cutting a release

@kukimik
Copy link
Collaborator Author

kukimik commented Nov 4, 2023

Closing the PR for now; see the discussion in dhall-lang/dhall-lang#1351.

@kukimik kukimik closed this Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants