ekmett / bytes

Serialization primitives that work with both cereal and binary.
http://hackage.haskell.org/package/bytes
Other
22 stars 13 forks source link

More instances for Serial #11

Closed nikita-volkov closed 8 years ago

nikita-volkov commented 10 years ago

There are serialization libraries, which provide support for a wider range of types, e.g.: Integer, Ordering, Month, Day, ClockTime, CalendarTime, TimeDiff, AbsoluteTime, LocalTime, ZonedTime, TimeOfDay, TimeZone, UTCTime, NominalDiffTime, Day, UniversalTime, DiffTime.

The implementation of those for "bytes" should be painless, as we can simply use the code from here as a reference.

The fact that instances for those quite standard types are missing from the library introduces the notorious "Orphan instances" issue, if they get implemented in whatever outer library.

If I get a confirmation on this, I can post an appropriate pull request.

ekmett commented 10 years ago

Go for it. =)

For some reason I wasn't notified about the creation of this issue. Sorry for the slow response.

nikita-volkov commented 10 years ago

Sorry, I've already implemented this in a wrapper library over "cereal": http://hackage.haskell.org/package/cereal-plus, so I won't have time to do this now.

davean commented 10 years ago

I have not implemented:

Month ClockTime CalendarTime TimeDiff

due to them being part of old-time.

The rest are now in my repository.

On Wed, Jan 15, 2014 at 3:23 PM, Edward Kmett notifications@github.comwrote:

Go for it. =)

For some reason I wasn't notified about the creation of this issue. Sorry for the slow response.

— Reply to this email directly or view it on GitHubhttps://github.com/ekmett/bytes/issues/11#issuecomment-32411027 .