You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Proposed solution: Add function hoistMaybe :: Applicative m => Maybe a -> MaybeT m a which already have been implemented in relude.
This will make working with MaybeT transformer more convinient
The text was updated successfully, but these errors were encountered:
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 `
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 `
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: