
3 Jun
2011
3 Jun
'11
2:42 p.m.
On Fri, Jun 3, 2011 at 11:52 AM, Yitzchak Gale
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