
7 Jan
2008
7 Jan
'08
12:13 a.m.
Adam Langley wrote:
This is mostly a cut-n-paste job from the excellent binary package which provides Data.Binary.Strict.Get - a monad which is a drop in replacement for Get, but which parses strict ByteStrings and returns an Either,
Ooh, nice. We could really do with an incremental version, too, which could be spoonfed chunks of bytes, and dole out values as deserialisation completes. Passing back a Left String is in some sense not much of an improvement over calling error, as if I merely doesn't have enough bytes accumulated yet, I can't restart parsing from the point the bytes ran out. Any chance you'd like to hand back a continuation instead?