Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A strict version of the Maybe
type.
Import qualified, as in
import qualified Agda.Utils.Maybe.Strict as Strict
Synopsis
- module Data.Strict.Maybe
- module Data.Strict.Classes
- forMaybe :: [a] -> (a -> Maybe b) -> [b]
- caseMaybeM :: Monad m => m (Maybe a) -> m b -> (a -> m b) -> m b
- fromMaybeM :: Monad m => m a -> m (Maybe a) -> m a
- filterMaybe :: (a -> Bool) -> a -> Maybe a
- whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
- unionMaybeWith :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a
- unzipMaybe :: Maybe (a, b) -> (Maybe a, Maybe b)
- caseMaybe :: Maybe a -> b -> (a -> b) -> b
- maybeM :: Monad m => m b -> (a -> m b) -> m (Maybe a) -> m b
- ifJustM :: Monad m => m (Maybe a) -> (a -> m b) -> m b -> m b
- whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()
Documentation
module Data.Strict.Maybe
module Data.Strict.Classes
forMaybe :: [a] -> (a -> Maybe b) -> [b] Source #
Version of mapMaybe
with different argument ordering.
caseMaybeM :: Monad m => m (Maybe a) -> m b -> (a -> m b) -> m b Source #
filterMaybe :: (a -> Bool) -> a -> Maybe a Source #
Filtering a singleton list.
filterMaybe p a =listToMaybe
(filter
p [a])
unionMaybeWith :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a Source #
unionWith
for collections of size <= 1.
ifJustM :: Monad m => m (Maybe a) -> (a -> m b) -> m b -> m b Source #
caseMaybeM
with flipped branches.
whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m () Source #
caseMaybeM
without the Nothing
case.
Orphan instances
Applicative Maybe Source # | Note that strict Maybe is an |
Null (Maybe a) Source # | |