haskell / time

A time library
http://hackage.haskell.org/package/time
Other
118 stars 78 forks source link

Generic instance for DayOfWeek #252

Closed NorfairKing closed 5 months ago

NorfairKing commented 7 months ago

This would let me generate instances for type classes such as GenValid.

AshleyYakeley commented 7 months ago

OK, this might apply to other types too.

NorfairKing commented 7 months ago

OK, this might apply to other types too.

Yes please!

AshleyYakeley commented 7 months ago

Relevant: #45, #99, #154

AshleyYakeley commented 7 months ago

Candidate types: DayOfWeek, TimeOfDay, LocalTime, TimeZone, ZonedTime, CalendarDiffDays, CalendarDiffTime.

AshleyYakeley commented 7 months ago

Hmm, might do all types with exposed constructors. Rationale in #45 not to do instance Generic UTCTime was that the constructor was not exposed, but it is now.

NorfairKing commented 7 months ago

This would be a big win for my projects! Note that this is a breaking change because many projects have orphan Generic instances for those types.

NorfairKing commented 7 months ago

@AshleyYakeley what are next steps?

AshleyYakeley commented 5 months ago

Done.