[Haskell-cafe] parsec3 pre-release [attempt 2]
aslatter at gmail.com
Sat Feb 2 18:28:07 EST 2008
I'm not a fan of parameterizing the "Stream" class over the monad parameter `m':
> class Stream s m t | s -> t where
> uncons :: s -> m (Maybe (t,s))
which leads to instance declarations like so:
> instance Monad m => Stream [tok] m tok where
> uncons  = return $ Nothing
> uncons (t:ts) = return $ Just (t,ts)
I looked through the sources and I didn't see anywhere where this
parameterization gained anything. As a proof of this I did a
mechanical re-write removing the class parameter, and the library
still seems to work.
On Feb 1, 2008 11:15 PM, Derek Elkins <derek.a.elkins at gmail.com> wrote:
> [Now with 100% more correct darcs get URLs.]
> I'm currently getting Paolo Martini's Google Summer of Code project, an
> updated version of Parsec, into a releasable state, and I will be
> maintaining it for at least a while.
> Paolo's major additions are:
> * The Parser monad has been generalized into a Parser monad
> * The parsers have been generalized to work over a stream of any
> type, in particular, with bytestrings.
> I have made a few minor additions as well:
> * There is Haddock documentation for almost all functions
> * The Parser monad now has Applicative/Alternative instances
> Currently, I am looking for people to give it a go reporting any bugs in
> the library or documentation, troubles building it, or changes/features
> they would like. I'm also interested in performance information.
> Most old Parsec code should be relatively easy but not trivial to port.
> There is a darcs repository on code.haskell.org. If nothing comes up,
> I'll put a package on Hackage in about a week or so.
> To get the code:
> darcs get http://code.haskell.org/parsec3
> To build it, the standard cabal commands should work:
> Alternatively, you can use the cabal-install application:
> The documentation can be generated also via the normal cabal routine, or
> via cabal-install.
> The Text.Parsec modules should be preferred to the
> Text.ParserCombinators.Parsec modules.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe