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

Lifting functions for transformers #60

Closed
chshersh opened this issue Aug 19, 2018 · 1 comment
Closed

Lifting functions for transformers #60

chshersh opened this issue Aug 19, 2018 · 1 comment
Assignees
Labels
new Bring something new into library (add function or type or interface)

Comments

@chshersh
Copy link
Contributor

maybeToMaybeT :: Maybe a -> MaybeT m a
eitherToExceptT :: Either e a -> ExceptT e m a
@chshersh chshersh added the new Bring something new into library (add function or type or interface) label Aug 19, 2018
@chshersh chshersh added this to the v0.3.0: Combinators milestone Aug 19, 2018
@chshersh
Copy link
Contributor Author

chshersh commented Sep 8, 2018

I see that such functions exist in errors package, which means, that we don't need to invent new names. Let's have the following functions:

hoistMaybe  :: Applicative m => Maybe a -> MaybeT m a
hoistEither :: Applicative m => Either e a -> ExceptT e m a

hlint rules can be added according to implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Bring something new into library (add function or type or interface)
Projects
No open projects
Development

No branches or pull requests

2 participants