Skip to content

Reconsider alternative instance for Transformer typeclasses #56

Closed
@safareli

Description

@safareli

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions