ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Utils.Monad

Description

Utilities related to Monad and Applicative classes Mostly for backwards compatibility.

Synopsis

Documentation

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

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

(<*>) :: f (a -> b) -> f a -> f b #

liftA2 :: (a -> b -> c) -> f a -> f b -> f c #

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

(<*) :: f a -> f b -> f a #

Instances

Instances details
Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

pure :: a -> Complex a #

(<*>) :: Complex (a -> b) -> Complex a -> Complex b #

liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

(*>) :: Complex a -> Complex b -> Complex b #

(<*) :: Complex a -> Complex b -> Complex a #

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a #

(<*>) :: Max (a -> b) -> Max a -> Max b #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

(*>) :: Max a -> Max b -> Max b #

(<*) :: Max a -> Max b -> Max a #

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a #

(<*>) :: Min (a -> b) -> Min a -> Min b #

liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

(*>) :: Min a -> Min b -> Min b #

(<*) :: Min a -> Min b -> Min a #

Applicative Get 
Instance details

Defined in Data.Binary.Get.Internal

Methods

pure :: a -> Get a #

(<*>) :: Get (a -> b) -> Get a -> Get b #

liftA2 :: (a -> b -> c) -> Get a -> Get b -> Get c #

(*>) :: Get a -> Get b -> Get b #

(<*) :: Get a -> Get b -> Get a #

Applicative PutM 
Instance details

Defined in Data.Binary.Put

Methods

pure :: a -> PutM a #

(<*>) :: PutM (a -> b) -> PutM a -> PutM b #

liftA2 :: (a -> b -> c) -> PutM a -> PutM b -> PutM c #

(*>) :: PutM a -> PutM b -> PutM b #

(<*) :: PutM a -> PutM b -> PutM a #

Applicative Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

pure :: a -> Put a #

(<*>) :: Put (a -> b) -> Put a -> Put b #

liftA2 :: (a -> b -> c) -> Put a -> Put b -> Put c #

(*>) :: Put a -> Put b -> Put b #

(<*) :: Put a -> Put b -> Put a #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Applicative Tree 
Instance details

Defined in Data.Tree

Methods

pure :: a -> Tree a #

(<*>) :: Tree (a -> b) -> Tree a -> Tree b #

liftA2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c #

(*>) :: Tree a -> Tree b -> Tree b #

(<*) :: Tree a -> Tree b -> Tree a #

Applicative PD Source # 
Instance details

Defined in GHC.Cmm.Parser.Monad

Methods

pure :: a -> PD a #

(<*>) :: PD (a -> b) -> PD a -> PD b #

liftA2 :: (a -> b -> c) -> PD a -> PD b -> PD c #

(*>) :: PD a -> PD b -> PD b #

(<*) :: PD a -> PD b -> PD a #

Applicative NatM Source # 
Instance details

Defined in GHC.CmmToAsm.Monad

Methods

pure :: a -> NatM a #

(<*>) :: NatM (a -> b) -> NatM a -> NatM b #

liftA2 :: (a -> b -> c) -> NatM a -> NatM b -> NatM c #

(*>) :: NatM a -> NatM b -> NatM b #

(<*) :: NatM a -> NatM b -> NatM a #

Applicative LlvmM Source # 
Instance details

Defined in GHC.CmmToLlvm.Base

Methods

pure :: a -> LlvmM a #

(<*>) :: LlvmM (a -> b) -> LlvmM a -> LlvmM b #

liftA2 :: (a -> b -> c) -> LlvmM a -> LlvmM b -> LlvmM c #

(*>) :: LlvmM a -> LlvmM b -> LlvmM b #

(<*) :: LlvmM a -> LlvmM b -> LlvmM a #

Applicative CoreM Source # 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

pure :: a -> CoreM a #

(<*>) :: CoreM (a -> b) -> CoreM a -> CoreM b #

liftA2 :: (a -> b -> c) -> CoreM a -> CoreM b -> CoreM c #

(*>) :: CoreM a -> CoreM b -> CoreM b #

(<*) :: CoreM a -> CoreM b -> CoreM a #

Applicative SimplM Source # 
Instance details

Defined in GHC.Core.Opt.Simplify.Monad

Methods

pure :: a -> SimplM a #

(<*>) :: SimplM (a -> b) -> SimplM a -> SimplM b #

liftA2 :: (a -> b -> c) -> SimplM a -> SimplM b -> SimplM c #

(*>) :: SimplM a -> SimplM b -> SimplM b #

(<*) :: SimplM a -> SimplM b -> SimplM a #

Applicative UnifyResultM Source # 
Instance details

Defined in GHC.Core.Unify

Applicative NullCollapseViz Source # 
Instance details

Defined in GHC.Data.Graph.Collapse

Applicative Infinite Source # 
Instance details

Defined in GHC.Data.List.Infinite

Methods

pure :: a -> Infinite a #

(<*>) :: Infinite (a -> b) -> Infinite a -> Infinite b #

liftA2 :: (a -> b -> c) -> Infinite a -> Infinite b -> Infinite c #

(*>) :: Infinite a -> Infinite b -> Infinite b #

(<*) :: Infinite a -> Infinite b -> Infinite a #

Applicative Pair Source # 
Instance details

Defined in GHC.Data.Pair

Methods

pure :: a -> Pair a #

(<*>) :: Pair (a -> b) -> Pair a -> Pair b #

liftA2 :: (a -> b -> c) -> Pair a -> Pair b -> Pair c #

(*>) :: Pair a -> Pair b -> Pair b #

(<*) :: Pair a -> Pair b -> Pair a #

Applicative Maybe Source # 
Instance details

Defined in GHC.Data.Strict

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Applicative Hsc Source # 
Instance details

Defined in GHC.Driver.Env.Types

Methods

pure :: a -> Hsc a #

(<*>) :: Hsc (a -> b) -> Hsc a -> Hsc b #

liftA2 :: (a -> b -> c) -> Hsc a -> Hsc b -> Hsc c #

(*>) :: Hsc a -> Hsc b -> Hsc b #

(<*) :: Hsc a -> Hsc b -> Hsc a #

Applicative Ghc Source # 
Instance details

Defined in GHC.Driver.Monad

Methods

pure :: a -> Ghc a #

(<*>) :: Ghc (a -> b) -> Ghc a -> Ghc b #

liftA2 :: (a -> b -> c) -> Ghc a -> Ghc b -> Ghc c #

(*>) :: Ghc a -> Ghc b -> Ghc b #

(<*) :: Ghc a -> Ghc b -> Ghc a #

Applicative HookedUse Source # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

pure :: a -> HookedUse a #

(<*>) :: HookedUse (a -> b) -> HookedUse a -> HookedUse b #

liftA2 :: (a -> b -> c) -> HookedUse a -> HookedUse b -> HookedUse c #

(*>) :: HookedUse a -> HookedUse b -> HookedUse b #

(<*) :: HookedUse a -> HookedUse b -> HookedUse a #

Applicative MatchResult Source #

Product is an "or" on fallibility---the combined match result is infallible only if the left and right argument match results both were.

This is useful for combining a bunch of alternatives together and then getting the overall fallibility of the entire group. See mkDataConCase for an example.

Instance details

Defined in GHC.HsToCore.Monad

Methods

pure :: a -> MatchResult a #

(<*>) :: MatchResult (a -> b) -> MatchResult a -> MatchResult b #

liftA2 :: (a -> b -> c) -> MatchResult a -> MatchResult b -> MatchResult c #

(*>) :: MatchResult a -> MatchResult b -> MatchResult b #

(<*) :: MatchResult a -> MatchResult b -> MatchResult a #

Applicative P Source # 
Instance details

Defined in GHC.Parser.Lexer

Methods

pure :: a -> P a #

(<*>) :: P (a -> b) -> P a -> P b #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c #

(*>) :: P a -> P b -> P b #

(<*) :: P a -> P b -> P a #

Applicative PV Source # 
Instance details

Defined in GHC.Parser.PostProcess

Methods

pure :: a -> PV a #

(<*>) :: PV (a -> b) -> PV a -> PV b #

liftA2 :: (a -> b -> c) -> PV a -> PV b -> PV c #

(*>) :: PV a -> PV b -> PV b #

(<*) :: PV a -> PV b -> PV a #

Applicative CpsRn Source # 
Instance details

Defined in GHC.Rename.Pat

Methods

pure :: a -> CpsRn a #

(<*>) :: CpsRn (a -> b) -> CpsRn a -> CpsRn b #

liftA2 :: (a -> b -> c) -> CpsRn a -> CpsRn b -> CpsRn c #

(*>) :: CpsRn a -> CpsRn b -> CpsRn b #

(<*) :: CpsRn a -> CpsRn b -> CpsRn a #

Applicative LiftM Source # 
Instance details

Defined in GHC.Stg.Lift.Monad

Methods

pure :: a -> LiftM a #

(<*>) :: LiftM (a -> b) -> LiftM a -> LiftM b #

liftA2 :: (a -> b -> c) -> LiftM a -> LiftM b -> LiftM c #

(*>) :: LiftM a -> LiftM b -> LiftM b #

(<*) :: LiftM a -> LiftM b -> LiftM a #

Applicative CmmParse Source # 
Instance details

Defined in GHC.StgToCmm.ExtCode

Methods

pure :: a -> CmmParse a #

(<*>) :: CmmParse (a -> b) -> CmmParse a -> CmmParse b #

liftA2 :: (a -> b -> c) -> CmmParse a -> CmmParse b -> CmmParse c #

(*>) :: CmmParse a -> CmmParse b -> CmmParse b #

(<*) :: CmmParse a -> CmmParse b -> CmmParse a #

Applicative FCode Source # 
Instance details

Defined in GHC.StgToCmm.Monad

Methods

pure :: a -> FCode a #

(<*>) :: FCode (a -> b) -> FCode a -> FCode b #

liftA2 :: (a -> b -> c) -> FCode a -> FCode b -> FCode c #

(*>) :: FCode a -> FCode b -> FCode b #

(<*) :: FCode a -> FCode b -> FCode a #

Applicative SolverStage Source # 
Instance details

Defined in GHC.Tc.Solver.Monad

Methods

pure :: a -> SolverStage a #

(<*>) :: SolverStage (a -> b) -> SolverStage a -> SolverStage b #

liftA2 :: (a -> b -> c) -> SolverStage a -> SolverStage b -> SolverStage c #

(*>) :: SolverStage a -> SolverStage b -> SolverStage b #

(<*) :: SolverStage a -> SolverStage b -> SolverStage a #

Applicative TcS Source # 
Instance details

Defined in GHC.Tc.Solver.Monad

Methods

pure :: a -> TcS a #

(<*>) :: TcS (a -> b) -> TcS a -> TcS b #

liftA2 :: (a -> b -> c) -> TcS a -> TcS b -> TcS c #

(*>) :: TcS a -> TcS b -> TcS b #

(<*) :: TcS a -> TcS b -> TcS a #

Applicative TcPluginM Source # 
Instance details

Defined in GHC.Tc.Types

Methods

pure :: a -> TcPluginM a #

(<*>) :: TcPluginM (a -> b) -> TcPluginM a -> TcPluginM b #

liftA2 :: (a -> b -> c) -> TcPluginM a -> TcPluginM b -> TcPluginM c #

(*>) :: TcPluginM a -> TcPluginM b -> TcPluginM b #

(<*) :: TcPluginM a -> TcPluginM b -> TcPluginM a #

Applicative ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

pure :: a -> ZonkM a #

(<*>) :: ZonkM (a -> b) -> ZonkM a -> ZonkM b #

liftA2 :: (a -> b -> c) -> ZonkM a -> ZonkM b -> ZonkM c #

(*>) :: ZonkM a -> ZonkM b -> ZonkM b #

(<*) :: ZonkM a -> ZonkM b -> ZonkM a #

Applicative UniqSM Source # 
Instance details

Defined in GHC.Types.Unique.Supply

Methods

pure :: a -> UniqSM a #

(<*>) :: UniqSM (a -> b) -> UniqSM a -> UniqSM b #

liftA2 :: (a -> b -> c) -> UniqSM a -> UniqSM b -> UniqSM c #

(*>) :: UniqSM a -> UniqSM b -> UniqSM b #

(<*) :: UniqSM a -> UniqSM b -> UniqSM a #

Applicative NonEmpty 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> NonEmpty a #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

Applicative STM 
Instance details

Defined in GHC.Internal.Conc.Sync

Methods

pure :: a -> STM a #

(<*>) :: STM (a -> b) -> STM a -> STM b #

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

(*>) :: STM a -> STM b -> STM b #

(<*) :: STM a -> STM b -> STM a #

Applicative Identity 
Instance details

Defined in GHC.Internal.Data.Functor.Identity

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Applicative First 
Instance details

Defined in GHC.Internal.Data.Monoid

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last 
Instance details

Defined in GHC.Internal.Data.Monoid

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Down 
Instance details

Defined in GHC.Internal.Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

Applicative Dual 
Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

pure :: a -> Dual a #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

(*>) :: Dual a -> Dual b -> Dual b #

(<*) :: Dual a -> Dual b -> Dual a #

Applicative Product 
Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

pure :: a -> Product a #

(<*>) :: Product (a -> b) -> Product a -> Product b #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

(*>) :: Product a -> Product b -> Product b #

(<*) :: Product a -> Product b -> Product a #

Applicative Sum 
Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Applicative ZipList 
Instance details

Defined in GHC.Internal.Functor.ZipList

Methods

pure :: a -> ZipList a #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

(*>) :: ZipList a -> ZipList b -> ZipList b #

(<*) :: ZipList a -> ZipList b -> ZipList a #

Applicative Par1 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> Par1 a #

(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b #

liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c #

(*>) :: Par1 a -> Par1 b -> Par1 b #

(<*) :: Par1 a -> Par1 b -> Par1 a #

Applicative P 
Instance details

Defined in GHC.Internal.Text.ParserCombinators.ReadP

Methods

pure :: a -> P a #

(<*>) :: P (a -> b) -> P a -> P b #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c #

(*>) :: P a -> P b -> P b #

(<*) :: P a -> P b -> P a #

Applicative ReadP 
Instance details

Defined in GHC.Internal.Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a #

(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b #

liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c #

(*>) :: ReadP a -> ReadP b -> ReadP b #

(<*) :: ReadP a -> ReadP b -> ReadP a #

Applicative ReadPrec 
Instance details

Defined in GHC.Internal.Text.ParserCombinators.ReadPrec

Methods

pure :: a -> ReadPrec a #

(<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b #

liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c #

(*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

(<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a #

Applicative IO 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> IO a #

(<*>) :: IO (a -> b) -> IO a -> IO b #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

(*>) :: IO a -> IO b -> IO b #

(<*) :: IO a -> IO b -> IO a #

Applicative GHCiQ 
Instance details

Defined in GHCi.TH

Methods

pure :: a -> GHCiQ a #

(<*>) :: GHCiQ (a -> b) -> GHCiQ a -> GHCiQ b #

liftA2 :: (a -> b -> c) -> GHCiQ a -> GHCiQ b -> GHCiQ c #

(*>) :: GHCiQ a -> GHCiQ b -> GHCiQ b #

(<*) :: GHCiQ a -> GHCiQ b -> GHCiQ a #

Applicative PprM 
Instance details

Defined in Language.Haskell.TH.PprLib

Methods

pure :: a -> PprM a #

(<*>) :: PprM (a -> b) -> PprM a -> PprM b #

liftA2 :: (a -> b -> c) -> PprM a -> PprM b -> PprM c #

(*>) :: PprM a -> PprM b -> PprM b #

(<*) :: PprM a -> PprM b -> PprM a #

Applicative Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

pure :: a -> Q a #

(<*>) :: Q (a -> b) -> Q a -> Q b #

liftA2 :: (a -> b -> c) -> Q a -> Q b -> Q c #

(*>) :: Q a -> Q b -> Q b #

(<*) :: Q a -> Q b -> Q a #

Applicative Maybe 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Applicative Solo 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> Solo a #

(<*>) :: Solo (a -> b) -> Solo a -> Solo b #

liftA2 :: (a -> b -> c) -> Solo a -> Solo b -> Solo c #

(*>) :: Solo a -> Solo b -> Solo b #

(<*) :: Solo a -> Solo b -> Solo a #

Applicative [] 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> [a] #

(<*>) :: [a -> b] -> [a] -> [b] #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

(*>) :: [a] -> [b] -> [b] #

(<*) :: [a] -> [b] -> [a] #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

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

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Applicative (SetM s) 
Instance details

Defined in Data.Graph

Methods

pure :: a -> SetM s a #

(<*>) :: SetM s (a -> b) -> SetM s a -> SetM s b #

liftA2 :: (a -> b -> c) -> SetM s a -> SetM s b -> SetM s c #

(*>) :: SetM s a -> SetM s b -> SetM s b #

(<*) :: SetM s a -> SetM s b -> SetM s a #

Monad m => Applicative (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

pure :: a -> CatchT m a #

(<*>) :: CatchT m (a -> b) -> CatchT m a -> CatchT m b #

liftA2 :: (a -> b -> c) -> CatchT m a -> CatchT m b -> CatchT m c #

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

(<*) :: CatchT m a -> CatchT m b -> CatchT m a #

Applicative (RegM freeRegs) Source # 
Instance details

Defined in GHC.CmmToAsm.Reg.Linear.State

Methods

pure :: a -> RegM freeRegs a #

(<*>) :: RegM freeRegs (a -> b) -> RegM freeRegs a -> RegM freeRegs b #

liftA2 :: (a -> b -> c) -> RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs c #

(*>) :: RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs b #

(<*) :: RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs a #

Applicative (WasmCodeGenM w) Source # 
Instance details

Defined in GHC.CmmToAsm.Wasm.Types

Methods

pure :: a -> WasmCodeGenM w a #

(<*>) :: WasmCodeGenM w (a -> b) -> WasmCodeGenM w a -> WasmCodeGenM w b #

liftA2 :: (a -> b -> c) -> WasmCodeGenM w a -> WasmCodeGenM w b -> WasmCodeGenM w c #

(*>) :: WasmCodeGenM w a -> WasmCodeGenM w b -> WasmCodeGenM w b #

(<*) :: WasmCodeGenM w a -> WasmCodeGenM w b -> WasmCodeGenM w a #

Applicative (IOEnv m) Source # 
Instance details

Defined in GHC.Data.IOEnv

Methods

pure :: a -> IOEnv m a #

(<*>) :: IOEnv m (a -> b) -> IOEnv m a -> IOEnv m b #

liftA2 :: (a -> b -> c) -> IOEnv m a -> IOEnv m b -> IOEnv m c #

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

(<*) :: IOEnv m a -> IOEnv m b -> IOEnv m a #

Applicative (MaybeErr err) Source # 
Instance details

Defined in GHC.Data.Maybe

Methods

pure :: a -> MaybeErr err a #

(<*>) :: MaybeErr err (a -> b) -> MaybeErr err a -> MaybeErr err b #

liftA2 :: (a -> b -> c) -> MaybeErr err a -> MaybeErr err b -> MaybeErr err c #

(*>) :: MaybeErr err a -> MaybeErr err b -> MaybeErr err b #

(<*) :: MaybeErr err a -> MaybeErr err b -> MaybeErr err a #

Monad m => Applicative (EwM m) Source # 
Instance details

Defined in GHC.Driver.CmdLine

Methods

pure :: a -> EwM m a #

(<*>) :: EwM m (a -> b) -> EwM m a -> EwM m b #

liftA2 :: (a -> b -> c) -> EwM m a -> EwM m b -> EwM m c #

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

(<*) :: EwM m a -> EwM m b -> EwM m a #

Applicative m => Applicative (GhcT m) Source # 
Instance details

Defined in GHC.Driver.Monad

Methods

pure :: a -> GhcT m a #

(<*>) :: GhcT m (a -> b) -> GhcT m a -> GhcT m b #

liftA2 :: (a -> b -> c) -> GhcT m a -> GhcT m b -> GhcT m c #

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

(<*) :: GhcT m a -> GhcT m b -> GhcT m a #

Applicative (CmdLineP s) Source # 
Instance details

Defined in GHC.Driver.Session

Methods

pure :: a -> CmdLineP s a #

(<*>) :: CmdLineP s (a -> b) -> CmdLineP s a -> CmdLineP s b #

liftA2 :: (a -> b -> c) -> CmdLineP s a -> CmdLineP s b -> CmdLineP s c #

(*>) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s b #

(<*) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s a #

Applicative (PuResult a) Source # 
Instance details

Defined in GHC.Tc.Utils.Unify

Methods

pure :: a0 -> PuResult a a0 #

(<*>) :: PuResult a (a0 -> b) -> PuResult a a0 -> PuResult a b #

liftA2 :: (a0 -> b -> c) -> PuResult a a0 -> PuResult a b -> PuResult a c #

(*>) :: PuResult a a0 -> PuResult a b -> PuResult a b #

(<*) :: PuResult a a0 -> PuResult a b -> PuResult a a0 #

Applicative (ZonkBndrT m) Source # 
Instance details

Defined in GHC.Tc.Zonk.Env

Methods

pure :: a -> ZonkBndrT m a #

(<*>) :: ZonkBndrT m (a -> b) -> ZonkBndrT m a -> ZonkBndrT m b #

liftA2 :: (a -> b -> c) -> ZonkBndrT m a -> ZonkBndrT m b -> ZonkBndrT m c #

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

(<*) :: ZonkBndrT m a -> ZonkBndrT m b -> ZonkBndrT m a #

Applicative m => Applicative (ZonkT m) Source # 
Instance details

Defined in GHC.Tc.Zonk.Env

Methods

pure :: a -> ZonkT m a #

(<*>) :: ZonkT m (a -> b) -> ZonkT m a -> ZonkT m b #

liftA2 :: (a -> b -> c) -> ZonkT m a -> ZonkT m b -> ZonkT m c #

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

(<*) :: ZonkT m a -> ZonkT m b -> ZonkT m a #

Applicative (Codensity f) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

pure :: a -> Codensity f a #

(<*>) :: Codensity f (a -> b) -> Codensity f a -> Codensity f b #

liftA2 :: (a -> b -> c) -> Codensity f a -> Codensity f b -> Codensity f c #

(*>) :: Codensity f a -> Codensity f b -> Codensity f b #

(<*) :: Codensity f a -> Codensity f b -> Codensity f a #

Applicative (State s) Source # 
Instance details

Defined in GHC.Utils.Monad.State.Strict

Methods

pure :: a -> State s a #

(<*>) :: State s (a -> b) -> State s a -> State s b #

liftA2 :: (a -> b -> c) -> State s a -> State s b -> State s c #

(*>) :: State s a -> State s b -> State s b #

(<*) :: State s a -> State s b -> State s a #

Arrow a => Applicative (ArrowMonad a) 
Instance details

Defined in GHC.Internal.Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Applicative (Either e) 
Instance details

Defined in GHC.Internal.Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Applicative (Proxy :: Type -> Type) 
Instance details

Defined in GHC.Internal.Data.Proxy

Methods

pure :: a -> Proxy a #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

(*>) :: Proxy a -> Proxy b -> Proxy b #

(<*) :: Proxy a -> Proxy b -> Proxy a #

Applicative (U1 :: Type -> Type) 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> U1 a #

(<*>) :: U1 (a -> b) -> U1 a -> U1 b #

liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c #

(*>) :: U1 a -> U1 b -> U1 b #

(<*) :: U1 a -> U1 b -> U1 a #

Applicative (ST s) 
Instance details

Defined in GHC.Internal.ST

Methods

pure :: a -> ST s a #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #

(*>) :: ST s a -> ST s b -> ST s b #

(<*) :: ST s a -> ST s b -> ST s a #

Applicative f => Applicative (Lift f)

A combination is Pure only if both parts are.

Instance details

Defined in Control.Applicative.Lift

Methods

pure :: a -> Lift f a #

(<*>) :: Lift f (a -> b) -> Lift f a -> Lift f b #

liftA2 :: (a -> b -> c) -> Lift f a -> Lift f b -> Lift f c #

(*>) :: Lift f a -> Lift f b -> Lift f b #

(<*) :: Lift f a -> Lift f b -> Lift f a #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

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

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

Monoid a => Applicative ((,) a) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a0 -> (a, a0) #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) #

(*>) :: (a, a0) -> (a, b) -> (a, b) #

(<*) :: (a, a0) -> (a, b) -> (a, a0) #

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

(Applicative f, Monad f) => Applicative (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMissing f x a #

(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c #

(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a #

Applicative (Stream m a) Source # 
Instance details

Defined in GHC.Data.Stream

Methods

pure :: a0 -> Stream m a a0 #

(<*>) :: Stream m a (a0 -> b) -> Stream m a a0 -> Stream m a b #

liftA2 :: (a0 -> b -> c) -> Stream m a a0 -> Stream m a b -> Stream m a c #

(*>) :: Stream m a a0 -> Stream m a b -> Stream m a b #

(<*) :: Stream m a a0 -> Stream m a b -> Stream m a a0 #

Monad m => Applicative (StreamS m a) Source # 
Instance details

Defined in GHC.Data.Stream

Methods

pure :: a0 -> StreamS m a a0 #

(<*>) :: StreamS m a (a0 -> b) -> StreamS m a a0 -> StreamS m a b #

liftA2 :: (a0 -> b -> c) -> StreamS m a a0 -> StreamS m a b -> StreamS m a c #

(*>) :: StreamS m a a0 -> StreamS m a b -> StreamS m a b #

(<*) :: StreamS m a a0 -> StreamS m a b -> StreamS m a a0 #

(Applicative f, Monad f) => Applicative (WhenMissing f x) Source #

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: ghc-0.5.9

Instance details

Defined in GHC.Data.Word64Map.Internal

Methods

pure :: a -> WhenMissing f x a #

(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c #

(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a #

Applicative m => Applicative (Kleisli m a) 
Instance details

Defined in GHC.Internal.Control.Arrow

Methods

pure :: a0 -> Kleisli m a a0 #

(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #

liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c #

(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 #

Monoid m => Applicative (Const m :: Type -> Type) 
Instance details

Defined in GHC.Internal.Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

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

(<*) :: Const m a -> Const m b -> Const m a #

Applicative f => Applicative (Ap f) 
Instance details

Defined in GHC.Internal.Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

Applicative f => Applicative (Alt f) 
Instance details

Defined in GHC.Internal.Data.Semigroup.Internal

Methods

pure :: a -> Alt f a #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

(*>) :: Alt f a -> Alt f b -> Alt f b #

(<*) :: Alt f a -> Alt f b -> Alt f a #

(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f) 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> Generically1 f a #

(<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b #

liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c #

(*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b #

(<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a #

Applicative f => Applicative (Rec1 f) 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> Rec1 f a #

(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #

liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #

(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a #

Applicative f => Applicative (Backwards f)

Apply f-actions in the reverse order.

Instance details

Defined in Control.Applicative.Backwards

Methods

pure :: a -> Backwards f a #

(<*>) :: Backwards f (a -> b) -> Backwards f a -> Backwards f b #

liftA2 :: (a -> b -> c) -> Backwards f a -> Backwards f b -> Backwards f c #

(*>) :: Backwards f a -> Backwards f b -> Backwards f b #

(<*) :: Backwards f a -> Backwards f b -> Backwards f a #

(Monoid w, Functor m, Monad m) => Applicative (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

pure :: a -> AccumT w m a #

(<*>) :: AccumT w m (a -> b) -> AccumT w m a -> AccumT w m b #

liftA2 :: (a -> b -> c) -> AccumT w m a -> AccumT w m b -> AccumT w m c #

(*>) :: AccumT w m a -> AccumT w m b -> AccumT w m b #

(<*) :: AccumT w m a -> AccumT w m b -> AccumT w m a #

(Functor m, Monad m) => Applicative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

pure :: a -> ExceptT e m a #

(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #

liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #

Applicative m => Applicative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

pure :: a -> IdentityT m a #

(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b #

liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c #

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

(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

(Functor m, Monad m) => Applicative (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

pure :: a -> SelectT r m a #

(<*>) :: SelectT r m (a -> b) -> SelectT r m a -> SelectT r m b #

liftA2 :: (a -> b -> c) -> SelectT r m a -> SelectT r m b -> SelectT r m c #

(*>) :: SelectT r m a -> SelectT r m b -> SelectT r m b #

(<*) :: SelectT r m a -> SelectT r m b -> SelectT r m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Functor m, Monad m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

Monoid a => Applicative (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

pure :: a0 -> Constant a a0 #

(<*>) :: Constant a (a0 -> b) -> Constant a a0 -> Constant a b #

liftA2 :: (a0 -> b -> c) -> Constant a a0 -> Constant a b -> Constant a c #

(*>) :: Constant a a0 -> Constant a b -> Constant a b #

(<*) :: Constant a a0 -> Constant a b -> Constant a a0 #

Applicative f => Applicative (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

pure :: a -> Reverse f a #

(<*>) :: Reverse f (a -> b) -> Reverse f a -> Reverse f b #

liftA2 :: (a -> b -> c) -> Reverse f a -> Reverse f b -> Reverse f c #

(*>) :: Reverse f a -> Reverse f b -> Reverse f b #

(<*) :: Reverse f a -> Reverse f b -> Reverse f a #

(Monoid a, Monoid b) => Applicative ((,,) a b) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a0 -> (a, b, a0) #

(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) #

liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) #

(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #

(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) #

(Applicative f, Applicative g) => Applicative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

pure :: a -> Product f g a #

(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b #

liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(*>) :: Product f g a -> Product f g b -> Product f g b #

(<*) :: Product f g a -> Product f g b -> Product f g a #

(Monad f, Applicative f) => Applicative (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMatched f x y a #

(<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c #

(*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #

(<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a #

(Applicative f, Monad f) => Applicative (WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMissing f k x a #

(<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #

liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c #

(*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #

(<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a #

(Monad f, Applicative f) => Applicative (WhenMatched f x y) Source #

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: ghc-0.5.9

Instance details

Defined in GHC.Data.Word64Map.Internal

Methods

pure :: a -> WhenMatched f x y a #

(<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c #

(*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #

(<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a #

(Applicative f, Applicative g) => Applicative (f :*: g) 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> (f :*: g) a #

(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b #

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c #

(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #

(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a #

Monoid c => Applicative (K1 i c :: Type -> Type) 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> K1 i c a #

(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b #

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b #

(<*) :: K1 i c a -> K1 i c b -> K1 i c a #

Applicative (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

pure :: a -> ContT r m a #

(<*>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #

liftA2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #

(*>) :: ContT r m a -> ContT r m b -> ContT r m b #

(<*) :: ContT r m a -> ContT r m b -> ContT r m a #

(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a0 -> (a, b, c, a0) #

(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) #

liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) #

(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #

(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) #

Applicative ((->) r) 
Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> r -> a #

(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b #

liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c #

(*>) :: (r -> a) -> (r -> b) -> r -> b #

(<*) :: (r -> a) -> (r -> b) -> r -> a #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(Monad f, Applicative f) => Applicative (WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMatched f k x y a #

(<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c #

(*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #

(<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a #

(Applicative f, Applicative g) => Applicative (f :.: g) 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> (f :.: g) a #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a #

Applicative f => Applicative (M1 i c f) 
Instance details

Defined in GHC.Internal.Generics

Methods

pure :: a -> M1 i c f a #

(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b #

liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 #

(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #

(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a #

(Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(<$>) :: Functor f => (a -> b) -> f a -> f b #

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

Methods

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

Instances

Instances details
MonadFix Complex

Since: base-4.15.0.0

Instance details

Defined in Data.Complex

Methods

mfix :: (a -> Complex a) -> Complex a #

MonadFix First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> First a) -> First a #

MonadFix Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Last a) -> Last a #

MonadFix Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Max a) -> Max a #

MonadFix Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Min a) -> Min a #

MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a #

MonadFix Tree

Since: containers-0.5.11

Instance details

Defined in Data.Tree

Methods

mfix :: (a -> Tree a) -> Tree a #

MonadFix Ghc Source # 
Instance details

Defined in GHC.Driver.Monad

Methods

mfix :: (a -> Ghc a) -> Ghc a #

MonadFix TcS Source # 
Instance details

Defined in GHC.Tc.Solver.Monad

Methods

mfix :: (a -> TcS a) -> TcS a #

MonadFix UniqSM Source # 
Instance details

Defined in GHC.Types.Unique.Supply

Methods

mfix :: (a -> UniqSM a) -> UniqSM a #

MonadFix NonEmpty 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> NonEmpty a) -> NonEmpty a #

MonadFix Identity 
Instance details

Defined in GHC.Internal.Data.Functor.Identity

Methods

mfix :: (a -> Identity a) -> Identity a #

MonadFix First 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> First a) -> First a #

MonadFix Last 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Last a) -> Last a #

MonadFix Down 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Down a) -> Down a #

MonadFix Dual 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Dual a) -> Dual a #

MonadFix Product 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Product a) -> Product a #

MonadFix Sum 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Sum a) -> Sum a #

MonadFix Par1 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Par1 a) -> Par1 a #

MonadFix IO 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> IO a) -> IO a #

MonadFix Q

If the function passed to mfix inspects its argument, the resulting action will throw a FixIOException.

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

mfix :: (a -> Q a) -> Q a #

MonadFix Maybe 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Maybe a) -> Maybe a #

MonadFix Solo 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Solo a) -> Solo a #

MonadFix [] 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> [a]) -> [a] #

MonadFix m => MonadFix (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

mfix :: (a -> CatchT m a) -> CatchT m a #

MonadFix (IOEnv env) Source # 
Instance details

Defined in GHC.Data.IOEnv

Methods

mfix :: (a -> IOEnv env a) -> IOEnv env a #

MonadFix m => MonadFix (GhcT m) Source # 
Instance details

Defined in GHC.Driver.Monad

Methods

mfix :: (a -> GhcT m a) -> GhcT m a #

MonadIO m => MonadFix (ZonkBndrT m) Source # 
Instance details

Defined in GHC.Tc.Zonk.Env

Methods

mfix :: (a -> ZonkBndrT m a) -> ZonkBndrT m a #

MonadFix m => MonadFix (ZonkT m) Source # 
Instance details

Defined in GHC.Tc.Zonk.Env

Methods

mfix :: (a -> ZonkT m a) -> ZonkT m a #

MonadIO m => MonadFix (Codensity m) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

mfix :: (a -> Codensity m a) -> Codensity m a #

MonadFix (Either e) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Either e a) -> Either e a #

MonadFix (ST s) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> ST s a) -> ST s a #

MonadFix m => MonadFix (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mfix :: (a -> MaybeT m a) -> MaybeT m a #

MonadFix f => MonadFix (Ap f) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Ap f a) -> Ap f a #

MonadFix f => MonadFix (Alt f) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Alt f a) -> Alt f a #

MonadFix f => MonadFix (Rec1 f) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Rec1 f a) -> Rec1 f a #

(Monoid w, Functor m, MonadFix m) => MonadFix (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

mfix :: (a -> AccumT w m a) -> AccumT w m a #

MonadFix m => MonadFix (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mfix :: (a -> ExceptT e m a) -> ExceptT e m a #

MonadFix m => MonadFix (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mfix :: (a -> IdentityT m a) -> IdentityT m a #

MonadFix m => MonadFix (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mfix :: (a -> ReaderT r m a) -> ReaderT r m a #

MonadFix m => MonadFix (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

mfix :: (a -> StateT s m a) -> StateT s m a #

MonadFix m => MonadFix (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mfix :: (a -> StateT s m a) -> StateT s m a #

MonadFix m => MonadFix (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadFix m) => MonadFix (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadFix m) => MonadFix (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

(MonadFix f, MonadFix g) => MonadFix (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mfix :: (a -> Product f g a) -> Product f g a #

(MonadFix f, MonadFix g) => MonadFix (f :*: g) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> (f :*: g) a) -> (f :*: g) a #

MonadFix ((->) r) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> r -> a) -> r -> a #

MonadFix f => MonadFix (M1 i c f) 
Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> M1 i c f a) -> M1 i c f a #

MonadFix m => MonadFix (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a #

(Monoid w, MonadFix m) => MonadFix (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a #

(Monoid w, MonadFix m) => MonadFix (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a #

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

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a Source #

Lift a computation from the IO monad. This allows us to run IO computations in any monadic stack, so long as it supports these kinds of operations (i.e. IO is the base monad for the stack).

Example

Expand
import Control.Monad.Trans.State -- from the "transformers" library

printState :: Show s => StateT s IO ()
printState = do
  state <- get
  liftIO $ print state

Had we omitted liftIO, we would have ended up with this error:

• Couldn't match type ‘IO’ with ‘StateT s IO’
 Expected type: StateT s IO ()
   Actual type: IO ()

The important part here is the mismatch between StateT s IO () and IO ().

Luckily, we know of a function that takes an IO a and returns an (m a): liftIO, enabling us to run the program and see the expected results:

> evalStateT printState "hello"
"hello"

> evalStateT printState 3
3

Instances

Instances details
MonadIO CoreM Source # 
Instance details

Defined in GHC.Core.Opt.Monad

Methods

liftIO :: IO a -> CoreM a Source #

MonadIO SimplM Source # 
Instance details

Defined in GHC.Core.Opt.Simplify.Monad

Methods

liftIO :: IO a -> SimplM a Source #

MonadIO Hsc Source # 
Instance details

Defined in GHC.Driver.Env.Types

Methods

liftIO :: IO a -> Hsc a Source #

MonadIO Ghc Source # 
Instance details

Defined in GHC.Driver.Monad

Methods

liftIO :: IO a -> Ghc a Source #

MonadIO HookedUse Source # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

liftIO :: IO a -> HookedUse a Source #

MonadIO TcS Source # 
Instance details

Defined in GHC.Tc.Solver.Monad

Methods

liftIO :: IO a -> TcS a Source #

MonadIO ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

liftIO :: IO a -> ZonkM a Source #

MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a Source #

MonadIO GHCiQ 
Instance details

Defined in GHCi.TH

Methods

liftIO :: IO a -> GHCiQ a Source #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a Source #

MonadIO m => MonadIO (CatchT m) 
Instance details

Defined in Control.Monad.Catch.Pure

Methods

liftIO :: IO a -> CatchT m a Source #

MonadIO (IOEnv env) Source # 
Instance details

Defined in GHC.Data.IOEnv

Methods

liftIO :: IO a -> IOEnv env a Source #

MonadIO m => MonadIO (EwM m) Source # 
Instance details

Defined in GHC.Driver.CmdLine

Methods

liftIO :: IO a -> EwM m a Source #

MonadIO m => MonadIO (GhcT m) Source # 
Instance details

Defined in GHC.Driver.Monad

Methods

liftIO :: IO a -> GhcT m a Source #

MonadIO m => MonadIO (ZonkBndrT m) Source # 
Instance details

Defined in GHC.Tc.Zonk.Env

Methods

liftIO :: IO a -> ZonkBndrT m a Source #

MonadIO m => MonadIO (ZonkT m) Source # 
Instance details

Defined in GHC.Tc.Zonk.Env

Methods

liftIO :: IO a -> ZonkT m a Source #

MonadIO m => MonadIO (Codensity m) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

liftIO :: IO a -> Codensity m a Source #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a Source #

MonadIO m => MonadIO (Stream m b) Source # 
Instance details

Defined in GHC.Data.Stream

Methods

liftIO :: IO a -> Stream m b a Source #

(Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

liftIO :: IO a -> AccumT w m a Source #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a Source #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a Source #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a Source #

MonadIO m => MonadIO (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

liftIO :: IO a -> SelectT r m a Source #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a Source #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a Source #

MonadIO m => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.CPS

Methods

liftIO :: IO a -> WriterT w m a Source #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftIO :: IO a -> WriterT w m a Source #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a Source #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a Source #

MonadIO m => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

liftIO :: IO a -> RWST r w s m a Source #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

liftIO :: IO a -> RWST r w s m a Source #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

liftIO :: IO a -> RWST r w s m a Source #

zipWith3M :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m [d] Source #

zipWith3M_ :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m () Source #

zipWith4M :: Monad m => (a -> b -> c -> d -> m e) -> [a] -> [b] -> [c] -> [d] -> m [e] Source #

zipWithAndUnzipM :: Monad m => (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d]) Source #

zipWith3MNE :: Monad m => (a -> b -> c -> m d) -> NonEmpty a -> NonEmpty b -> NonEmpty c -> m (NonEmpty d) Source #

zipWith3M for NonEmpty lists.

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

mapAndUnzip3M :: Monad m => (a -> m (b, c, d)) -> [a] -> m ([b], [c], [d]) Source #

mapAndUnzipM for triples

mapAndUnzip4M :: Monad m => (a -> m (b, c, d, e)) -> [a] -> m ([b], [c], [d], [e]) Source #

mapAndUnzip5M :: Monad m => (a -> m (b, c, d, e, f)) -> [a] -> m ([b], [c], [d], [e], [f]) Source #

mapAccumLM Source #

Arguments

:: (Monad m, Traversable t) 
=> (acc -> x -> m (acc, y))

combining function

-> acc

initial state

-> t x

inputs

-> m (acc, t y)

final state, outputs

Monadic version of mapAccumL

mapSndM :: (Applicative m, Traversable f) => (b -> m c) -> f (a, b) -> m (f (a, c)) Source #

Monadic version of mapSnd

concatMapM :: (Monad m, Traversable f) => (a -> m [b]) -> f a -> m [b] Source #

Monadic version of concatMap

mapMaybeM :: Applicative m => (a -> m (Maybe b)) -> [a] -> m [b] Source #

Applicative version of mapMaybe

anyM :: (Monad m, Foldable f) => (a -> m Bool) -> f a -> m Bool Source #

Monadic version of any, aborts the computation at the first True value

allM :: (Monad m, Foldable f) => (a -> m Bool) -> f a -> m Bool Source #

Monad version of all, aborts the computation at the first False value

orM :: Monad m => m Bool -> m Bool -> m Bool Source #

Monadic version of or

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

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

Monadic version of foldl that discards its result

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

whenM :: Monad m => m Bool -> m () -> m () Source #

Monadic version of when, taking the condition in the monad

unlessM :: Monad m => m Bool -> m () -> m () Source #

Monadic version of unless, taking the condition in the monad

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

Like filterM, only it reverses the sense of the test.

partitionM :: Monad m => (a -> m Bool) -> [a] -> m ([a], [a]) Source #

Monadic version of partition