[Haskell-cafe] Mixing Unboxed Mutable Vectors and Parsers
Mario Blažević
mblazevic at stilo.com
Tue Apr 10 21:41:11 CEST 2012
On 12-04-07 05:35 PM, Myles C. Maxfield wrote:
> So here are my questions:
> ...
> 3. Are there any parsers that support streaming semantics and being
> used as a monad transformer? This would require rewriting my whole
> program to use this new parser, but if that's what I have to do, then
> so be it.
Have a look at the incremental-parser package. It's not a monad
transformer, only a monad, but it's written with streaming in mind. In
particular, it solves the problem of mismatch between the input chunk
boundaries and the boundaries of the structures you're trying to parse.
The current version supports ByteString, Text, and list inputs out of
the box, but support for Vector and arrays can be added as outside
instances.
More information about the Haskell-Cafe
mailing list