Converting things to and from binary

George Russell ger@tzi.de
Wed, 21 May 2003 13:48:32 +0200


Simon Marlow wrote:
> Do you have an application where being in the IO monad to do this stuff
> isn't possible, or is inconvenient?
No.  But it is inelegant, since IO is the *only* way the bit consumer has
of preserving state.  So if for example the target is a list of arrays and
bytes, it would be necessary to hold the list inside an IORef or something
similar.