
3 Feb
2008
3 Feb
'08
3:53 p.m.
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