On Fri, Jun 29, 2007 at 07:39:28PM +0100, Andrew Coppin wrote:
> Now I have a problem. It's easy enough to pass the entire data stream
> through an RLE decoder and feed that to the Huffman table deserialize
> function, and it will give be back the table. But I now have *no clue*
> where the table ends in the original stream!
Sounds to me like you want a parsing monad. Generally, when you want
state, you want a monad, and the field of parsing monads is pretty mature.
You can either write up a monad of your own, or use one of the existing
ones (parsec, frisby, read).
--
David Roundy
Department of Physics
Oregon State University
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe