Converting things to and from binary

Tomasz Zielonka
Wed, 21 May 2003 13:15:35 +0200

On Wed, May 21, 2003 at 11:52:00AM +0100, Simon Marlow wrote:
> When writing to a BinMem it would be possible to avoid the IO monad, and
> use something like the ST monad instead.  However, I'm not sure it's
> worth making this generalisation, since it would necessarily complicate
> the library quite a bit.
> Do you have an application where being in the IO monad to do this stuff
> isn't possible, or is inconvenient?

Since unboxed arrays have no outgoing edges in the heap graph, I can
think of using such library to reduce the heap graph (thus reducing GC
time) by storing some data in memory in binary form. Limiting library's
interface to IO monad would make it hard to use such technique in purely
functional code.

Maybe GHC could itself compress live but rarely accessed data in the


.signature: Too many levels of symbolic links