Proposal: Add the attoparsec package to the Haskell Platform
This is a proposal for the 'attoparsec' package to be included in the next major release of the Haskell platform.
Everyone is invited to review this proposal, following the standard procedure for proposing and reviewing packages.
Review comments should be sent to the libraries mailing list before Feb 23, which is the discussion deadline.
Proposal author: Gregory Collins
Package maintainer: Bryan O'Sullivan
The following individuals contributed to the review process:
- Gregory Collins
The attoparsec package is a fast applicative parser combinator library, aimed particularly at dealing efficiently with network protocols and complicated text/binary file formats. It offers backtracking parsers for ByteString? and Text.
Documentation and tarball from the hackage page:
Attoparsec trades away features from more complicated parser libraries like parsec and uuparsinglib (like meaningful error messages and independence over the ground character type) for speed. Compared with parsec, attoparsec is usually several times faster, which makes it appropriate for situations where throughput is paramount, like big-data processing and parsing network protocols. One other killer attoparsec feature is incremental parsing: this allows users to stream bytestring chunks to attoparsec, which responds either with a value or with a resumption continuation.
The attoparsec library is very widely used: according to http://packdeps.haskellers.com/, it has 180 reverse dependencies on Hackage.
Introduction to the API
The API is a fairly "standard" applicative parser: it offers a "Parser a" datatype which is an instance of Functor, Applicative, Alternative, and Monad, and typical combinators like "string" and "takeWhile".