[Haskell-cafe] Attoparsec concatenating combinator
Yitzchak Gale
gale at sefer.org
Thu Jun 2 16:02:18 CEST 2011
I often find while using attoparsec and attoparsec-text that I need to
match a number of text parsers consecutively and concatenate the
result. By "text parser" I mean "Parser ByteString" for attoparsec and
"Parser Text" for attoparsec-text.
It seems the best I can do is to collect them all in a list and then
apply concat. But that still copies the text several times.
Is there a combinator that does this without all that copying?
If not, does the internal representation easily admit such
a combinator?
Thanks,
Yitz
More information about the Haskell-Cafe
mailing list