On Fri, Jun 3, 2011 at 11:52 AM, Yitzchak Gale <g...@sefer.org> wrote: > Bryan O'Sullivan wrote: >> I'd like a no-copy combinator for the same reasons, but I think it's >> impossible to do without some low-level support. > > I wrote: >>> ...does the internal representation easily admit such a combinator? > >> Not very easily. Internally, attoparsec maintains just three pieces of data >> for its state... If >> there was a "bytes consumed" counter, it would be possible to write a >> "try"-like combinator > > I was thinking of even lower level: allocating a moderate chunk of > memory and writing the results directly into it consecutively as a > special case.
The blaze-builder might work for this also, this is exactly the problem it's designed for. G -- Gregory Collins <g...@gregorycollins.net> _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe