base-compat-0.11.1: A compatibility layer for base

Safe Haskell | Safe
Language | Haskell98

Control.Monad.Compat

# Documentation

guard :: Alternative f => Bool -> f () #

join :: Monad m => m (m a) -> m a #

class Applicative m => Monad (m :: Type -> Type) where #

Minimal complete definition

(>>=)

Methods

(>>=) :: m a -> (a -> m b) -> m b #

(>>) :: m a -> m b -> m b #

return :: a -> m a #

#### Instances

Instances details

Monad [] |
Instance details Defined in GHC.Base Methods (>>=) :: [a] -> (a -> [b]) -> [b] # (>>) :: [a] -> [b] -> [b] # return :: a -> [a] #
Monad Maybe |
Instance details Defined in GHC.Base Methods (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b # (>>) :: Maybe a -> Maybe b -> Maybe b # return :: a -> Maybe a #
Monad IO |
Instance details Defined in GHC.Base Methods (>>=) :: IO a -> (a -> IO b) -> IO b # (>>) :: IO a -> IO b -> IO b # return :: a -> IO a #
Monad STM |
Instance details Defined in GHC.Conc.Sync Methods (>>=) :: STM a -> (a -> STM b) -> STM b # (>>) :: STM a -> STM b -> STM b # return :: a -> STM a #
Monad NonEmpty |
Instance details Defined in GHC.Base Methods (>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b # (>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # return :: a -> NonEmpty a #
Monad P |
Instance details Defined in Text.ParserCombinators.ReadP Methods (>>=) :: P a -> (a -> P b) -> P b # (>>) :: P a -> P b -> P b # return :: a -> P a #
Monad ReadPrec |
Instance details Defined in Text.ParserCombinators.ReadPrec Methods (>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b # (>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b # return :: a -> ReadPrec a #
Monad Dual |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Dual a -> (a -> Dual b) -> Dual b # (>>) :: Dual a -> Dual b -> Dual b # return :: a -> Dual a #
Monad First |
Instance details Defined in Data.Monoid Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a #
Monad Identity |
Instance details Defined in Data.Functor.Identity Methods (>>=) :: Identity a -> (a -> Identity b) -> Identity b # (>>) :: Identity a -> Identity b -> Identity b # return :: a -> Identity a #
Monad Last |
Instance details Defined in Data.Monoid Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a #
Monad Product |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Product a -> (a -> Product b) -> Product b # (>>) :: Product a -> Product b -> Product b # return :: a -> Product a #
Monad Sum |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Sum a -> (a -> Sum b) -> Sum b # (>>) :: Sum a -> Sum b -> Sum b # return :: a -> Sum a #
Monad Complex |
Instance details Defined in Data.Complex Methods (>>=) :: Complex a -> (a -> Complex b) -> Complex b # (>>) :: Complex a -> Complex b -> Complex b # return :: a -> Complex a #
Monad ReadP |
Instance details Defined in Text.ParserCombinators.ReadP Methods (>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b # (>>) :: ReadP a -> ReadP b -> ReadP b # return :: a -> ReadP a #
Monad First |
Instance details Defined in Data.Semigroup Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a #
Monad Last |
Instance details Defined in Data.Semigroup Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a #
Monad Max |
Instance details Defined in Data.Semigroup Methods (>>=) :: Max a -> (a -> Max b) -> Max b # (>>) :: Max a -> Max b -> Max b # return :: a -> Max a #
Monad Min |
Instance details Defined in Data.Semigroup Methods (>>=) :: Min a -> (a -> Min b) -> Min b # (>>) :: Min a -> Min b -> Min b # return :: a -> Min a #
Monad Option |
Instance details Defined in Data.Semigroup Methods (>>=) :: Option a -> (a -> Option b) -> Option b # (>>) :: Option a -> Option b -> Option b # return :: a -> Option a #
Monad (Either e) |
Instance details Defined in Data.Either Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b # (>>) :: Either e a -> Either e b -> Either e b # return :: a -> Either e a #
Monoid a => Monad ((,) a) |
Instance details Defined in GHC.Base Methods (>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) # (>>) :: (a, a0) -> (a, b) -> (a, b) # return :: a0 -> (a, a0) #
Monad (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods (>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b # (>>) :: Proxy a -> Proxy b -> Proxy b # return :: a -> Proxy a #
Monad (ST s) |
Instance details Defined in Control.Monad.ST.Lazy.Imp Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b # (>>) :: ST s a -> ST s b -> ST s b # return :: a -> ST s a #
Monad (ST s) |
Instance details Defined in GHC.ST Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b # (>>) :: ST s a -> ST s b -> ST s b # return :: a -> ST s a #
Monad m => Monad (WrappedMonad m) |
Instance details Defined in Control.Applicative Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # return :: a -> WrappedMonad m a #
Monad f => Monad (Alt f) |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b # (>>) :: Alt f a -> Alt f b -> Alt f b # return :: a -> Alt f a #
Monad f => Monad (Ap f) |
Instance details Defined in Data.Monoid Methods (>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b # (>>) :: Ap f a -> Ap f b -> Ap f b # return :: a -> Ap f a #
Monad ((->) r :: Type -> Type) |
Instance details Defined in GHC.Base Methods (>>=) :: (r -> a) -> (a -> r -> b) -> r -> b # (>>) :: (r -> a) -> (r -> b) -> r -> b # return :: a -> r -> a #
(Monad f, Monad g) => Monad (Product f g) |
Instance details Defined in Data.Functor.Product Methods (>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b # (>>) :: Product f g a -> Product f g b -> Product f g b # return :: a -> Product f g a #

class Functor (f :: Type -> Type) where #

Methods

fmap :: (a -> b) -> f a -> f b #

#### Instances

Instances details

Functor [] |
Instance details Defined in GHC.Base Methods fmap :: (a -> b) -> [a] -> [b] # (<$) :: a -> [b] -> [a] #
Functor Maybe |
Instance details Defined in GHC.Base Methods fmap :: (a -> b) -> Maybe a -> Maybe b # (<$) :: a -> Maybe b -> Maybe a #
Functor IO |
Instance details Defined in GHC.Base Methods fmap :: (a -> b) -> IO a -> IO b # (<$) :: a -> IO b -> IO a #
Functor STM |
Instance details Defined in GHC.Conc.Sync Methods fmap :: (a -> b) -> STM a -> STM b # (<$) :: a -> STM b -> STM a #
Functor NonEmpty |
Instance details Defined in GHC.Base Methods fmap :: (a -> b) -> NonEmpty a -> NonEmpty b # (<$) :: a -> NonEmpty b -> NonEmpty a #
Functor P |
Instance details Defined in Text.ParserCombinators.ReadP Methods fmap :: (a -> b) -> P a -> P b # (<$) :: a -> P b -> P a #
Functor ReadPrec |
Instance details Defined in Text.ParserCombinators.ReadPrec Methods fmap :: (a -> b) -> ReadPrec a -> ReadPrec b # (<$) :: a -> ReadPrec b -> ReadPrec a #
Functor Handler |
Instance details Defined in Control.Exception Methods fmap :: (a -> b) -> Handler a -> Handler b # (<$) :: a -> Handler b -> Handler a #
Functor Dual |
Instance details Defined in Data.Semigroup.Internal Methods fmap :: (a -> b) -> Dual a -> Dual b # (<$) :: a -> Dual b -> Dual a #
Functor First |
Instance details Defined in Data.Monoid Methods fmap :: (a -> b) -> First a -> First b # (<$) :: a -> First b -> First a #
Functor Identity |
Instance details Defined in Data.Functor.Identity Methods fmap :: (a -> b) -> Identity a -> Identity b # (<$) :: a -> Identity b -> Identity a #
Functor Last |
Instance details Defined in Data.Monoid Methods fmap :: (a -> b) -> Last a -> Last b # (<$) :: a -> Last b -> Last a #
Functor Product |
Instance details Defined in Data.Semigroup.Internal Methods fmap :: (a -> b) -> Product a -> Product b # (<$) :: a -> Product b -> Product a #
Functor Sum |
Instance details Defined in Data.Semigroup.Internal Methods fmap :: (a -> b) -> Sum a -> Sum b # (<$) :: a -> Sum b -> Sum a #
Functor ZipList |
Instance details Defined in Control.Applicative Methods fmap :: (a -> b) -> ZipList a -> ZipList b # (<$) :: a -> ZipList b -> ZipList a #
Functor Complex |
Instance details Defined in Data.Complex Methods fmap :: (a -> b) -> Complex a -> Complex b # (<$) :: a -> Complex b -> Complex a #
Functor ReadP |
Instance details Defined in Text.ParserCombinators.ReadP Methods fmap :: (a -> b) -> ReadP a -> ReadP b # (<$) :: a -> ReadP b -> ReadP a #
Functor First |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> First a -> First b # (<$) :: a -> First b -> First a #
Functor Last |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Last a -> Last b # (<$) :: a -> Last b -> Last a #
Functor Max |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Max a -> Max b # (<$) :: a -> Max b -> Max a #
Functor Min |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Min a -> Min b # (<$) :: a -> Min b -> Min a #
Functor Option |
Instance details Defined in Data.Semigroup Methods fmap :: (a -> b) -> Option a -> Option b # (<$) :: a -> Option b -> Option a #
Functor (Either a) |
Instance details Defined in Data.Either Methods fmap :: (a0 -> b) -> Either a a0 -> Either a b # (<$) :: a0 -> Either a b -> Either a a0 #
Functor ((,) a) |
Instance details Defined in GHC.Base Methods fmap :: (a0 -> b) -> (a, a0) -> (a, b) # (<$) :: a0 -> (a, b) -> (a, a0) #
Functor (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods fmap :: (a -> b) -> Proxy a -> Proxy b # (<$) :: a -> Proxy b -> Proxy a #
Functor (ST s) |
Instance details Defined in Control.Monad.ST.Lazy.Imp Methods fmap :: (a -> b) -> ST s a -> ST s b # (<$) :: a -> ST s b -> ST s a #
Functor (ST s) |
Instance details Defined in GHC.ST Methods fmap :: (a -> b) -> ST s a -> ST s b # (<$) :: a -> ST s b -> ST s a #
Monad m => Functor (WrappedMonad m) |
Instance details Defined in Control.Applicative Methods fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b # (<$) :: a -> WrappedMonad m b -> WrappedMonad m a #
Functor (Arg a) |
Instance details Defined in Data.Semigroup Methods fmap :: (a0 -> b) -> Arg a a0 -> Arg a b # (<$) :: a0 -> Arg a b -> Arg a a0 #
Functor f => Functor (Alt f) |
Instance details Defined in Data.Semigroup.Internal Methods fmap :: (a -> b) -> Alt f a -> Alt f b # (<$) :: a -> Alt f b -> Alt f a #
Functor f => Functor (Ap f) |
Instance details Defined in Data.Monoid Methods fmap :: (a -> b) -> Ap f a -> Ap f b # (<$) :: a -> Ap f b -> Ap f a #
Functor (Const m :: Type -> Type) |
Instance details Defined in Data.Functor.Const Methods fmap :: (a -> b) -> Const m a -> Const m b # (<$) :: a -> Const m b -> Const m a #
Arrow a => Functor (WrappedArrow a b) |
Instance details Defined in Control.Applicative Methods fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # (<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #
Functor ((->) r :: Type -> Type) |
Instance details Defined in GHC.Base Methods fmap :: (a -> b) -> (r -> a) -> r -> b # (<$) :: a -> (r -> b) -> r -> a #
(Functor f, Functor g) => Functor (Product f g) |
Instance details Defined in Data.Functor.Product Methods fmap :: (a -> b) -> Product f g a -> Product f g b # (<$) :: a -> Product f g b -> Product f g a #
(Functor f, Functor g) => Functor (Sum f g) |
Instance details Defined in Data.Functor.Sum Methods fmap :: (a -> b) -> Sum f g a -> Sum f g b # (<$) :: a -> Sum f g b -> Sum f g a #
(Functor f, Functor g) => Functor (Compose f g) |
Instance details Defined in Data.Functor.Compose Methods fmap :: (a -> b) -> Compose f g a -> Compose f g b # (<$) :: a -> Compose f g b -> Compose f g a #

class Monad m => MonadFail (m :: Type -> Type) where #

Methods

fail :: String -> m a #

#### Instances

Instances details

MonadFail [] |
Instance details Defined in Control.Monad.Fail Methods fail :: String -> [a] #
MonadFail Maybe |
Instance details Defined in Control.Monad.Fail Methods fail :: String -> Maybe a #
MonadFail IO |
Instance details Defined in Control.Monad.Fail Methods fail :: String -> IO a #
MonadFail P |
Instance details Defined in Text.ParserCombinators.ReadP Methods fail :: String -> P a #
MonadFail ReadPrec |
Instance details Defined in Text.ParserCombinators.ReadPrec Methods fail :: String -> ReadPrec a #
MonadFail ReadP |
Instance details Defined in Text.ParserCombinators.ReadP Methods fail :: String -> ReadP a #
MonadFail (ST s) |
Instance details Defined in Control.Monad.ST.Lazy.Imp Methods fail :: String -> ST s a #
MonadFail (ST s) |
Instance details Defined in GHC.ST Methods fail :: String -> ST s a #
MonadFail f => MonadFail (Ap f) |
Instance details Defined in Data.Monoid Methods fail :: String -> Ap f a #

mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) #

sequence :: (Traversable t, Monad m) => t (m a) -> m (t a) #

(=<<) :: Monad m => (a -> m b) -> m a -> m b #

ap :: Monad m => m (a -> b) -> m a -> m b #

liftM :: Monad m => (a1 -> r) -> m a1 -> m r #

liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r #

liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r #

liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r #

liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r #

when :: Applicative f => Bool -> f () -> f () #

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #

Minimal complete definition

Nothing

Methods

mzero :: m a #

mplus :: m a -> m a -> m a #

#### Instances

Instances details

MonadPlus [] |
Instance details Defined in GHC.Base Methods mzero :: [a] # mplus :: [a] -> [a] -> [a] #
MonadPlus Maybe |
Instance details Defined in GHC.Base Methods mzero :: Maybe a # mplus :: Maybe a -> Maybe a -> Maybe a #
MonadPlus IO |
Instance details Defined in GHC.Base Methods mzero :: IO a # mplus :: IO a -> IO a -> IO a #
MonadPlus STM |
Instance details Defined in GHC.Conc.Sync Methods mzero :: STM a # mplus :: STM a -> STM a -> STM a #
MonadPlus P |
Instance details Defined in Text.ParserCombinators.ReadP Methods mzero :: P a # mplus :: P a -> P a -> P a #
MonadPlus ReadPrec |
Instance details Defined in Text.ParserCombinators.ReadPrec Methods mzero :: ReadPrec a # mplus :: ReadPrec a -> ReadPrec a -> ReadPrec a #
MonadPlus ReadP |
Instance details Defined in Text.ParserCombinators.ReadP Methods mzero :: ReadP a # mplus :: ReadP a -> ReadP a -> ReadP a #
MonadPlus Option |
Instance details Defined in Data.Semigroup Methods mzero :: Option a # mplus :: Option a -> Option a -> Option a #
MonadPlus (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods mzero :: Proxy a # mplus :: Proxy a -> Proxy a -> Proxy a #
MonadPlus f => MonadPlus (Alt f) |
Instance details Defined in Data.Semigroup.Internal Methods mzero :: Alt f a # mplus :: Alt f a -> Alt f a -> Alt f a #
MonadPlus f => MonadPlus (Ap f) |
Instance details Defined in Data.Monoid Methods mzero :: Ap f a # mplus :: Ap f a -> Ap f a -> Ap f a #
(MonadPlus f, MonadPlus g) => MonadPlus (Product f g) |
Instance details Defined in Data.Functor.Product Methods mzero :: Product f g a # mplus :: Product f g a -> Product f g a -> Product f g a #

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () #

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #

(<$!>) :: Monad m => (a -> b) -> m a -> m b #

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c #

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c #

filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #

foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #

foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m () #

forever :: Applicative f => f a -> f b #

mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #

mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a #

replicateM :: Applicative m => Int -> m a -> m [a] #

replicateM_ :: Applicative m => Int -> m a -> m () #

unless :: Applicative f => Bool -> f () -> f () #

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #

forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () #

msum :: (Foldable t, MonadPlus m) => t (m a) -> m a #

void :: Functor f => f a -> f () #

forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) #

class Applicative m => Monad (m :: Type -> Type) #

Minimal complete definition

(>>=)

#### Instances

Instances details

Monad [] |
Instance details Defined in GHC.Base Methods (>>=) :: [a] -> (a -> [b]) -> [b] # (>>) :: [a] -> [b] -> [b] # return :: a -> [a] #
Monad Maybe |
Instance details Defined in GHC.Base Methods (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b # (>>) :: Maybe a -> Maybe b -> Maybe b # return :: a -> Maybe a #
Monad IO |
Instance details Defined in GHC.Base Methods (>>=) :: IO a -> (a -> IO b) -> IO b # (>>) :: IO a -> IO b -> IO b # return :: a -> IO a #
Monad STM |
Instance details Defined in GHC.Conc.Sync Methods (>>=) :: STM a -> (a -> STM b) -> STM b # (>>) :: STM a -> STM b -> STM b # return :: a -> STM a #
Monad NonEmpty |
Instance details Defined in GHC.Base Methods (>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b # (>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b # return :: a -> NonEmpty a #
Monad P |
Instance details Defined in Text.ParserCombinators.ReadP Methods (>>=) :: P a -> (a -> P b) -> P b # (>>) :: P a -> P b -> P b # return :: a -> P a #
Monad ReadPrec |
Instance details Defined in Text.ParserCombinators.ReadPrec Methods (>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b # (>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b # return :: a -> ReadPrec a #
Monad Dual |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Dual a -> (a -> Dual b) -> Dual b # (>>) :: Dual a -> Dual b -> Dual b # return :: a -> Dual a #
Monad First |
Instance details Defined in Data.Monoid Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a #
Monad Identity |
Instance details Defined in Data.Functor.Identity Methods (>>=) :: Identity a -> (a -> Identity b) -> Identity b # (>>) :: Identity a -> Identity b -> Identity b # return :: a -> Identity a #
Monad Last |
Instance details Defined in Data.Monoid Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a #
Monad Product |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Product a -> (a -> Product b) -> Product b # (>>) :: Product a -> Product b -> Product b # return :: a -> Product a #
Monad Sum |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Sum a -> (a -> Sum b) -> Sum b # (>>) :: Sum a -> Sum b -> Sum b # return :: a -> Sum a #
Monad Complex |
Instance details Defined in Data.Complex Methods (>>=) :: Complex a -> (a -> Complex b) -> Complex b # (>>) :: Complex a -> Complex b -> Complex b # return :: a -> Complex a #
Monad ReadP |
Instance details Defined in Text.ParserCombinators.ReadP Methods (>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b # (>>) :: ReadP a -> ReadP b -> ReadP b # return :: a -> ReadP a #
Monad First |
Instance details Defined in Data.Semigroup Methods (>>=) :: First a -> (a -> First b) -> First b # (>>) :: First a -> First b -> First b # return :: a -> First a #
Monad Last |
Instance details Defined in Data.Semigroup Methods (>>=) :: Last a -> (a -> Last b) -> Last b # (>>) :: Last a -> Last b -> Last b # return :: a -> Last a #
Monad Max |
Instance details Defined in Data.Semigroup Methods (>>=) :: Max a -> (a -> Max b) -> Max b # (>>) :: Max a -> Max b -> Max b # return :: a -> Max a #
Monad Min |
Instance details Defined in Data.Semigroup Methods (>>=) :: Min a -> (a -> Min b) -> Min b # (>>) :: Min a -> Min b -> Min b # return :: a -> Min a #
Monad Option |
Instance details Defined in Data.Semigroup Methods (>>=) :: Option a -> (a -> Option b) -> Option b # (>>) :: Option a -> Option b -> Option b # return :: a -> Option a #
Monad (Either e) |
Instance details Defined in Data.Either Methods (>>=) :: Either e a -> (a -> Either e b) -> Either e b # (>>) :: Either e a -> Either e b -> Either e b # return :: a -> Either e a #
Monoid a => Monad ((,) a) |
Instance details Defined in GHC.Base Methods (>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) # (>>) :: (a, a0) -> (a, b) -> (a, b) # return :: a0 -> (a, a0) #
Monad (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods (>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b # (>>) :: Proxy a -> Proxy b -> Proxy b # return :: a -> Proxy a #
Monad (ST s) |
Instance details Defined in Control.Monad.ST.Lazy.Imp Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b # (>>) :: ST s a -> ST s b -> ST s b # return :: a -> ST s a #
Monad (ST s) |
Instance details Defined in GHC.ST Methods (>>=) :: ST s a -> (a -> ST s b) -> ST s b # (>>) :: ST s a -> ST s b -> ST s b # return :: a -> ST s a #
Monad m => Monad (WrappedMonad m) |
Instance details Defined in Control.Applicative Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # return :: a -> WrappedMonad m a #
Monad f => Monad (Alt f) |
Instance details Defined in Data.Semigroup.Internal Methods (>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b # (>>) :: Alt f a -> Alt f b -> Alt f b # return :: a -> Alt f a #
Monad f => Monad (Ap f) |
Instance details Defined in Data.Monoid Methods (>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b # (>>) :: Ap f a -> Ap f b -> Ap f b # return :: a -> Ap f a #
Monad ((->) r :: Type -> Type) |
Instance details Defined in GHC.Base Methods (>>=) :: (r -> a) -> (a -> r -> b) -> r -> b # (>>) :: (r -> a) -> (r -> b) -> r -> b # return :: a -> r -> a #
(Monad f, Monad g) => Monad (Product f g) |
Instance details Defined in Data.Functor.Product Methods (>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b # (>>) :: Product f g a -> Product f g b -> Product f g b # return :: a -> Product f g a #

class Monad m => MonadFail (m :: Type -> Type) #

Minimal complete definition

fail

#### Instances

Instances details

MonadFail [] |
Instance details Defined in Control.Monad.Fail Methods fail :: String -> [a] #
MonadFail Maybe |
Instance details Defined in Control.Monad.Fail Methods fail :: String -> Maybe a #
MonadFail IO |
Instance details Defined in Control.Monad.Fail Methods fail :: String -> IO a #
MonadFail P |
Instance details Defined in Text.ParserCombinators.ReadP Methods fail :: String -> P a #
MonadFail ReadPrec |
Instance details Defined in Text.ParserCombinators.ReadPrec Methods fail :: String -> ReadPrec a #
MonadFail ReadP |
Instance details Defined in Text.ParserCombinators.ReadP Methods fail :: String -> ReadP a #
MonadFail (ST s) |
Instance details Defined in Control.Monad.ST.Lazy.Imp Methods fail :: String -> ST s a #
MonadFail (ST s) |
Instance details Defined in GHC.ST Methods fail :: String -> ST s a #
MonadFail f => MonadFail (Ap f) |
Instance details Defined in Data.Monoid Methods fail :: String -> Ap f a #

fail :: MonadFail m => String -> m a #

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #

Minimal complete definition

Nothing

Methods

mzero :: m a #

mplus :: m a -> m a -> m a #

#### Instances

Instances details

MonadPlus [] |
Instance details Defined in GHC.Base Methods mzero :: [a] # mplus :: [a] -> [a] -> [a] #
MonadPlus Maybe |
Instance details Defined in GHC.Base Methods mzero :: Maybe a # mplus :: Maybe a -> Maybe a -> Maybe a #
MonadPlus IO |
Instance details Defined in GHC.Base Methods mzero :: IO a # mplus :: IO a -> IO a -> IO a #
MonadPlus STM |
Instance details Defined in GHC.Conc.Sync Methods mzero :: STM a # mplus :: STM a -> STM a -> STM a #
MonadPlus P |
Instance details Defined in Text.ParserCombinators.ReadP Methods mzero :: P a # mplus :: P a -> P a -> P a #
MonadPlus ReadPrec |
Instance details Defined in Text.ParserCombinators.ReadPrec Methods mzero :: ReadPrec a # mplus :: ReadPrec a -> ReadPrec a -> ReadPrec a #
MonadPlus ReadP |
Instance details Defined in Text.ParserCombinators.ReadP Methods mzero :: ReadP a # mplus :: ReadP a -> ReadP a -> ReadP a #
MonadPlus Option |
Instance details Defined in Data.Semigroup Methods mzero :: Option a # mplus :: Option a -> Option a -> Option a #
MonadPlus (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods mzero :: Proxy a # mplus :: Proxy a -> Proxy a -> Proxy a #
MonadPlus f => MonadPlus (Alt f) |
Instance details Defined in Data.Semigroup.Internal Methods mzero :: Alt f a # mplus :: Alt f a -> Alt f a -> Alt f a #
MonadPlus f => MonadPlus (Ap f) |
Instance details Defined in Data.Monoid Methods mzero :: Ap f a # mplus :: Ap f a -> Ap f a -> Ap f a #
(MonadPlus f, MonadPlus g) => MonadPlus (Product f g) |
Instance details Defined in Data.Functor.Product Methods mzero :: Product f g a # mplus :: Product f g a -> Product f g a -> Product f g a #