[Haskell-cafe] blaze-builder and FlexibleInstances in code that aims to become part of the Haskell platform

Henning Thielemann schlepptop at henning-thielemann.de
Fri May 20 00:27:01 CEST 2011


Simon Meier schrieb:

> There are many providers of Writes. Each bounded-length-encoding of a
> standard Haskell value is likely to have a corresponding Write. For
> example, encoding an Int32 as a big-endian, little-endian, and
> host-endian byte-sequence is currently achieved with the following
> three functions.
> 
>   writeInt32BE :: Write Int32
>   writeInt32LE :: Write Int32
>   writeInt32HE :: Write Int32
> 
> I would like to avoid naming all these encodings individually.

Maybe this one helps:
http://hackage.haskell.org/packages/archive/storable-endian/0.2.4/doc/html/Data-Storable-Endian.html
?



More information about the Haskell-Cafe mailing list