Adding binary to the Haskell Platform

Alexander Dunlap alexander.dunlap at
Wed Aug 5 15:12:48 EDT 2009

On Tue, Aug 4, 2009 at 3:55 PM, 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

To add to the laundry list of problems with Data.Binary, I don't like
the fact that decode calls error on invalid input. I can't think of
any great alternatives (using Maybe as the result type would be too
strict, of course, and returning partial results would be difficult
with polymorphism), but it seems a bit unclean that decode has to be
used with the IO monad to catch the errors. (Of course, the only
reason you would have bad input would be if you were using the IO
monad, so the practical implications are not great, but still, it
would be nice if there was a better way.)


More information about the Libraries mailing list