[Haskell-cafe] Re: How efficient is read?
Stephen Tetley
stephen.tetley at gmail.com
Mon May 10 05:54:39 EDT 2010
On 10 May 2010 09:32, Paul R <paul.r.ml at gmail.com> wrote:
[SNIP]
>
> Indeed the doc for 2.0 is really comprehensive, but didn't the library
> evolve a lot between release 2.0 and 3.1 ?
Hi Paul
I think the internals evolved a lot more than the interface - so it
can handle parsing byte-strings etc. There was quite a long blog post
aggregated to Planet Haskell a few months ago detailing the new
internals, unfortunately I can't remember the author's name so can't
find you a reference (I'm sure is wasn't Derek Elkins who maintains
Parsec).
I still use Parsec 2.1 myself (I've no need to parse large files where
byte-strings would be a clear advantage) so I'm not the best person to
comment, but I've just scanned the Haddock documentation on Hackage
and the interfaces look very similar. The modules have slightly
different namespaces - so imports will be different and one would have
to choose which text type to use (Text.Parsec.ByteString;
Text.Parsec.ByteString.Lazy or Text.Parsec.String) and import the
appropriate module to get the "parseFromFile" function.
Best wishes
Stephen
More information about the Haskell-Cafe
mailing list