Skip to content

Adds default Quote/Unquote instances for Data.Time #57

Open
ara4711 wants to merge 1 commit into
brendanhay:mainfrom
ara4711:add-instances-for-data-time-types
Open

Adds default Quote/Unquote instances for Data.Time #57
ara4711 wants to merge 1 commit into
brendanhay:mainfrom
ara4711:add-instances-for-data-time-types

Conversation

@ara4711

@ara4711 ara4711 commented Jul 3, 2025

Copy link
Copy Markdown

This PR adds default Quote/Unquote instances for Data.Time types that have Aeson ToJSON/FromJSON instances.

Changes:

  • Adds Quote/Unquote instances for Data.Time types
  • Adds parse and format functions for UTCTime (and tests)
  • Adds two combinators to register functions what return Either:s
  • Adds (direct) dependecies on time and time-compat

These functions are in a sense available "for free" since they are already provided by Aeson. So, unless you
have some specific design constraints (e.g wanting to keep the number of dependencies down), I hope that you'd
find these additions worthwile.
I tried to pick "old" constraints on time and time-compat but is not overly familiar with what strategy one should take on versioning.
Happy to recieve any feedback/comments. Thanks for a really useful library!
cheers,
Andreas

…on ToJSON/FromJSON instances. Adds parse and format functions for UTTime.
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.

1 participant