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 compliance #49

Closed
tdammers opened this issue May 13, 2020 · 5 comments
Closed

MonadFail compliance #49

tdammers opened this issue May 13, 2020 · 5 comments
Assignees

Comments

@tdammers
Copy link
Owner

See #48: ginger currently fails to compile on GHC 8.8 due to MonadFail.

PR #48 suggests widening Monad constraints to arbitrary MonadFail instances, but I think it would be more prudent to integrate error handling into the runXXXX functions and the Run monad stack itself (e.g. using ExceptT), and while we're at it, introduce a saner / more specific error type. We're going to break the API anyway, might as well use this as an opportunity for improvement.

@tdammers tdammers self-assigned this May 13, 2020
tdammers added a commit that referenced this issue May 14, 2020
Rather than peppering the codebase with MonadFail constraints, I'm
taking this opportunity to get rid of those "dirty" failures, and
use the existing (!) MonadError instance already built into the Run
monad.

See #48, #49.
@ejconlon
Copy link

Thanks for fixing this! I tested this commit successfully in a project of mine. Can you cut a release to Hackage? I can post a PR to Stackage to re-integrate into LTS.

@tdammers
Copy link
Owner Author

Done! https://hackage.haskell.org/package/ginger-0.10.0.0

@ejconlon
Copy link

@ejconlon
Copy link

Now back in stackage, I think this can be closed. Thank you!

@tdammers
Copy link
Owner Author

Indeed. Closing.

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

2 participants