Skip to content

ExceptT Text IO #22

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

Merged
merged 1 commit into from
Dec 14, 2015
Merged

ExceptT Text IO #22

merged 1 commit into from
Dec 14, 2015

Conversation

gregwebs
Copy link
Contributor

No description provided.

snoyberg added a commit that referenced this pull request Dec 14, 2015
@snoyberg snoyberg merged commit 6f5d6fa into master Dec 14, 2015
@snoyberg
Copy link
Contributor

Thanks!


Generally the solution to the `ExceptT IO` anti-pattern is to return an `Either` from more functions and throw an exception for uncommon errors. Note that returning `Either` from `ExceptT IO` means there are now 3 distinct sources of errors in just one function.

Please not that using ExceptT, etc with a non-IO base monad (for example with pure code) is a perfectly fine pattern.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be "Please note that".

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

Successfully merging this pull request may close these issues.

3 participants