mgsloan / store

Fast binary serialization in Haskell
MIT License
109 stars 35 forks source link

Document how to write a 'Size' instance #100

Open sjakobi opened 7 years ago

sjakobi commented 7 years ago

Also, could this be simplified? Could Size have a Num instance? A MonoFunctor instance should definitely be possible.

sjakobi commented 7 years ago

Ok, turns out writing a Size instance is not all that hard once one has found the Size combinators in Data.Store.Internal.

I think these should be more prominent and possibly moved into a non-internal module, maybe something like Data.Store.Size.

mgsloan commented 7 years ago

A separate non-internal module makes sense to me!