-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add function to lift Maybe value into MaybeT #230
Labels
type:feature
Something new is added.
Comments
gpevnev
added a commit
that referenced
this issue
Aug 19, 2020
Problem: Currently to lift a value `ma :: Maybe a` into `MaybeT m a`` you need to write `MaybeT (pure ma)`, which is bloating code with unnecessary boilerplate. Same idea applies for `Either e a` and `ExceptT e m a`. ` Proposed solution: Add functions `hoistMaybe :: Applicative m => Maybe a -> MaybeT m a` and `hoistEither :: Applicative m => Either e a -> ExceptT e m a `
9 tasks
gpevnev
added a commit
that referenced
this issue
Aug 26, 2020
Problem: Currently to lift a value `ma :: Maybe a` into `MaybeT m a`` you need to write `MaybeT (pure ma)`, which is bloating code with unnecessary boilerplate. Same idea applies for `Either e a` and `ExceptT e m a`. ` Proposed solution: Add functions `hoistMaybe :: Applicative m => Maybe a -> MaybeT m a` and `hoistEither :: Applicative m => Either e a -> ExceptT e m a `
gromakovsky
added a commit
that referenced
this issue
Aug 26, 2020
[#230] Add `hoistMaybe` and `hoistEither` functions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem: Currently to lift a value
ma :: Maybe a
intoMaybeT m a
you need to writeMaybeT (pure ma)
, which is bloating code with unnecessary boilerplate.Proposed solution: Add function
hoistMaybe :: Applicative m => Maybe a -> MaybeT m a
which already have been implemented inrelude
.This will make working with MaybeT transformer more convinient
The text was updated successfully, but these errors were encountered: