[Haskell-cafe] parsec3 pre-release [attempt 2]
Antoine Latter
aslatter at gmail.com
Sun Feb 3 15:53:15 EST 2008
Another picky nit:
The monad transformer type is defined as such:
> data ParsecT s u m a
> = ParsecT { runParsecT :: State s u -> m (Consumed (m (Reply s u a))) }
with the Consumed and reply types as:
> data Consumed a = Consumed a
> | Empty !a
> data Reply s u a = Ok !a !(State s u) ParseError
> | Error ParseError
What's the advantage of having a double-wrapping of the base monad `m'
over the simpler type:
data ParsecT s u m a
= ParsecT { runParsecT :: State s u -> m (Consumed (Reply s u a)) }
-Antoine
More information about the Haskell-Cafe
mailing list