[Haskell-cafe] ANNOUNCE: picoparsec-0.1
mblazevic at stilo.com
Tue Jan 13 13:30:03 UTC 2015
The newly released package picoparsec  is a fork of attoparsec that
works with a much wider variety of input types than just ByteString and
Text. Parsers written with Picoparsec will generally perform a bit slower
than Attoparsec on strict ByteString and Text, somewhat faster than
Attoparsec on lazy Text, and much faster than Parsec on any of the
mutually-supported input types.
That being said, the main point of the library is to enable the writing
of generic parsers that are not constrained to any single input type.
Depending on the parser primitives used, Picoparsec will take any input
whose type is an instance of either NullMonoid, LeftGCDMonoid,
FactorialMonoid, or TextualMonoid. These are some of the subclasses of
Monoid defined in the monoid-subclasses package . Some of the input
types that are fully supported out of the box
- Seq Char
- Vector Char
- ByteStringUTF8, a thin newtype wrapper around ByteString
- Stateful (Map String a) Text, if you need to parse Text and keep track of
the the symbol table state
- OffsetPositioned String, in case you need to keep track of the current
- LinePositioned Text, to keep track of the current line and column
This release can be seen as the belated completion of the work described
in my Haskell Symposium 2013 presentation . The name Picoparsec seemed
to fit in just the right place between Parsec and Attoparsec, especially
since Nanoparsec  has already been taken.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe