Skip to content

MonadFail passthrough instance for HeistT? #118

@galenhuntington

Description

@galenhuntington

With MonadFailDesugaring as default landing in GHC 8.6, the lack of a MonadFail instance for HeistT may become more acute, and will probably cause code breakage. It's easy and I think most sensible to add a simple pass-through instance:

instance MonadFail m => MonadFail (HeistT n m) where fail = lift . fail

However, this would differ from the legacy fail, which is not defined for HeistT and thus falls to the default implementation, which is just a regular error. So for pure compatibility that could be done instead, although my feeling is that pass-through is a better design.

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