Binary: Put -> Builder

Henning Thielemann schlepptop at
Fri Jan 23 16:08:55 EST 2009

Duncan Coutts schrieb:
> On Fri, 2009-01-23 at 15:34 +0100, Henning Thielemann wrote:
>> Is there a way to get the underlying Builder of a 'put' of a Binary 
>> instance?
> The binary package exposes the Data.Binary.Builder module so you can use
> the Builder monoid directly. There is no need to go via the Put
> wrapper. 

I know, but the Binary class provides only a 'put' method in the 'PutM'
monad. I can wrap Put in a newtype with Monoid instance in order to get
what I want, but I hoped it would be simpler.

>> How does the Char instance of Binary serialize?
> -- Char is serialised as UTF-8
> instance Binary Char where
>   ...

Since this does not appear in the documentation, this is undocumented
behaviour? Just a Haddock deficiency, I know.

More information about the Libraries mailing list