mgsloan / store

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

Some sum types should have a ConstSize size #119

Closed sjakobi closed 6 years ago

sjakobi commented 6 years ago
> f s = case s of { VarSize _ -> "VarSize"; ConstSize _ -> "ConstSize"}
> f (Data.Store.size :: Size (Either Int Word))
"VarSize"

IMO this should be a ConstSize 9 as both Int and Word are ConstSize 8 (on my 64-bit machine).

mgsloan commented 6 years ago

Good point! Fixed in https://github.com/fpco/store/commit/6b22382564939fb2110564d854a049527cd8199b