Adding binary to the Haskell Platform

Krasimir Angelov kr.angelov at
Wed Aug 5 03:15:51 EDT 2009

The binary package is too lazy and in some cases the decoding dies
with "stack overflow". At least this was the situation the last time
when I tried to use it. Since then I am using hacked version which is
stricter. This should be addressed before to add this package to the

Another problem that I see is that Int is serialized as 64 bit
integer. This makes the serialized data too large. The Int type is
also used internally, for example to store the length of a list, the
size of a map, etc, so you can't avoid the problem by using custom
putInt function. In fact the binary representation is so verbose that
sometimes it is more compact to use textual representation. In my
hacked version I use serialization for integers which use variable
number of bytes. If someone wants to store 64 bit integer then he/she
could always use Int64. I know that the binary package could be
combined with gzip to make the data more compact but this is
unnecessary overhead.


On 8/5/09, Don Stewart <dons at> wrote:
> Here's a ticket for Simon Marlow's proposal:
> Let's discuss, then have the steering committee recommend yay/nay.
> -- Don
> _______________________________________________
> Libraries mailing list
> Libraries at

More information about the Libraries mailing list