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

FromDhall/ToDhall for types from time? #2286

Closed
amesgen opened this issue Aug 21, 2021 · 5 comments · Fixed by #2294
Closed

FromDhall/ToDhall for types from time? #2286

amesgen opened this issue Aug 21, 2021 · 5 comments · Fixed by #2294
Labels
enhancement marshalling Marshalling between Dhall and Haskell

Comments

@amesgen
Copy link
Contributor

amesgen commented Aug 21, 2021

I am not sure whether this has been discussed before, but what about implementing FromDhall/ToDhall for various types from time, like Day, TimeOfDay, LocalTime, ZonedTime, UTCTime, now with #2247?

@Gabriella439
Copy link
Collaborator

Whoops, this is an oversight on my part! Yeah, this is a great idea and it should be easy for me to add

@Gabriella439
Copy link
Collaborator

Fix is up here: #2294

@mergify mergify bot closed this as completed in #2294 Sep 2, 2021
mergify bot added a commit that referenced this issue Sep 2, 2021
* `FromDhall` / `ToDhall` instances for temporal values

Fixes #2286

* Add missing `FromDhall` instances

… as caught by @sjakobi

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@amesgen
Copy link
Contributor Author

amesgen commented Sep 11, 2021

Thanks for the instances for Day, TimeOfDay and TimeZone! I created #2300 to also add instances for LocalTime/ZonedTime/UTCTime (if that is desired).

@georgefst
Copy link

Would you consider also adding DayOfWeek (as the obvious 7-element enum)? I've found this useful in some projects.

@Gabriella439
Copy link
Collaborator

@georgefst: I opened a PR to add isntance for DayOfWeek: #2413

Gabriella439 added a commit that referenced this issue Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement marshalling Marshalling between Dhall and Haskell
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants