Generic instances for UTCTime, Day etc.
ocramz opened this issue · comments
Marco Z commented
I just noticed UTCTime
and Day
don't have a Generic
instance. I think they should have one instead, to facilitate interoperability with other libraries.
Ashley Yakeley commented
Marco Z commented
On one hand I agree, but on the other if the question keeps popping up there might be a need for this. I'm thinking of serialization to/from CSV files, database entries and similar.
Perhaps the instance could come with a note of warning to library authors.
Ashley Yakeley commented
Day
is a newtype of Integer
, so it should certainly be treated as atomic. Likewise, for something like a database, UTCTime
is always going to be represented as a single database column, so it should also be atomic.