Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. fromMaybeM :: Monad m => m a -> m (Maybe a) -> m a

    distribution-opensuse OpenSuse.Prelude

    Monadic generalisation of fromMaybe.

  2. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]

    distribution-opensuse OpenSuse.Prelude

    A version of mapMaybe that works with a monadic predicate.

  3. whenMaybe :: Applicative m => Bool -> m a -> m (Maybe a)

    distribution-opensuse OpenSuse.Prelude

    Like when, but return either Nothing if the predicate was False, or Just with the result of the computation.

    whenMaybe True  (print 1) == fmap Just (print 1)
    whenMaybe False (print 1) == pure Nothing
    

  4. whenMaybeM :: Monad m => m Bool -> m a -> m (Maybe a)

    distribution-opensuse OpenSuse.Prelude

    Like whenMaybe, but where the test can be monadic.

  5. toMaybe :: Bool -> a -> Maybe a

    dsp DSP.Basic

    generates a Just if the given condition holds

  6. throwMaybe :: forall (m :: Type -> Type) e a . Monad m => MSF (ExceptT e m) (Maybe e) (Maybe a)

    dunai Control.Monad.Trans.MSF.Except

    When the input is Just e, throw the exception e. (Does not output any actual data.)

  7. catchMaybe :: forall (m :: Type -> Type) a b . (Functor m, Monad m) => MSF (MaybeT m) a b -> MSF m a b -> MSF m a b

    dunai Control.Monad.Trans.MSF.Maybe

    When an exception occurs in the first msf, the second msf is executed from there.

  8. exceptToMaybeS :: forall (m :: Type -> Type) e a b . (Functor m, Monad m) => MSF (ExceptT e m) a b -> MSF (MaybeT m) a b

    dunai Control.Monad.Trans.MSF.Maybe

    Convert exceptions into Nothing, discarding the exception value.

  9. exceptToMaybeT :: forall (m :: Type -> Type) e a . Functor m => ExceptT e m a -> MaybeT m a

    dunai Control.Monad.Trans.MSF.Maybe

    Convert a ExceptT computation to MaybeT, discarding the value of any exception.

  10. hoistMaybe :: forall (m :: Type -> Type) b . Applicative m => Maybe b -> MaybeT m b

    dunai Control.Monad.Trans.MSF.Maybe

    Convert a Maybe computation to MaybeT.

Page 267 of many | Previous | Next