Closed
Description
When I first used MonadState
instance for ParserT I had ParserT s (State s') a
and I was expecting it to be defined as in most of transformers:
(MonadState s m) => MonadState s (ParserT s' m)
but instead it's defined as:
(Monad m) => MonadState (ParseState s) (ParserT s m)
-- `MonadThrow` and `MonadError` are defined in same fashion.
So my question is, why it's like that? I think If we had normal definitions of Monad*
then ParseT
would be more useful in transformer stacks (we could expose functions from this typeclasses with different name, for users to still be able to manipulate ParserT
's Internal structure).
Metadata
Metadata
Assignees
Labels
No labels