serokell / universum

:milky_way: Prelude written in @Serokell
MIT License
176 stars 26 forks source link

Add function to lift Maybe value into MaybeT #230

Closed gpevnev closed 4 years ago

gpevnev commented 4 years ago

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