Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MonadFail passthrough instance for HeistT? #118

Open
galenhuntington opened this issue Aug 16, 2018 · 0 comments
Open

MonadFail passthrough instance for HeistT? #118

galenhuntington opened this issue Aug 16, 2018 · 0 comments

Comments

@galenhuntington
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant