purescript-0.13.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Supply

Description

Fresh variable supply

Documentation

newtype SupplyT m a Source #

Constructors

SupplyT 

Fields

Instances
MonadTrans SupplyT Source # 
Instance details

Defined in Control.Monad.Supply

Methods

lift :: Monad m => m a -> SupplyT m a #

MonadError e m => MonadError e (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply

Methods

throwError :: e -> SupplyT m a #

catchError :: SupplyT m a -> (e -> SupplyT m a) -> SupplyT m a #

MonadReader r m => MonadReader r (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply

Methods

ask :: SupplyT m r #

local :: (r -> r) -> SupplyT m a -> SupplyT m a #

reader :: (r -> a) -> SupplyT m a #

MonadWriter w m => MonadWriter w (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply

Methods

writer :: (a, w) -> SupplyT m a #

tell :: w -> SupplyT m () #

listen :: SupplyT m a -> SupplyT m (a, w) #

pass :: SupplyT m (a, w -> w) -> SupplyT m a #

Monad m => Monad (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply

Methods

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

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

return :: a -> SupplyT m a #

fail :: String -> SupplyT m a #

Functor m => Functor (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply

Methods

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

(<$) :: a -> SupplyT m b -> SupplyT m a #

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

Defined in Control.Monad.Supply

Methods

pure :: a -> SupplyT m a #

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

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

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

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

MonadPlus m => MonadPlus (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply

Methods

mzero :: SupplyT m a #

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

MonadPlus m => Alternative (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply

Methods

empty :: SupplyT m a #

(<|>) :: SupplyT m a -> SupplyT m a -> SupplyT m a #

some :: SupplyT m a -> SupplyT m [a] #

many :: SupplyT m a -> SupplyT m [a] #

Monad m => MonadSupply (SupplyT m) Source # 
Instance details

Defined in Control.Monad.Supply.Class

evalSupplyT :: Functor m => Integer -> SupplyT m a -> m a Source #