Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- module Data.Maybe
- data MaybeErr err val
- failME :: err -> MaybeErr err val
- isSuccess :: MaybeErr err val -> Bool
- orElse :: Maybe a -> a -> a
- firstJust :: Maybe a -> Maybe a -> Maybe a
- firstJusts :: [Maybe a] -> Maybe a
- whenIsJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
- expectJust :: String -> Maybe a -> a
- newtype MaybeT m a = MaybeT {}
- liftMaybeT :: Monad m => m a -> MaybeT m a
Documentation
module Data.Maybe
firstJusts :: [Maybe a] -> Maybe a Source
Takes a list of Maybes
and returns the first Just
if there is one, or
Nothing
otherwise.
whenIsJust :: Monad m => Maybe a -> (a -> m ()) -> m () Source
expectJust :: String -> Maybe a -> a Source
liftMaybeT :: Monad m => m a -> MaybeT m a Source