purescript-0.12.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 # 

Methods

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

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

Methods

ask :: SupplyT m r #

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

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

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

Methods

throwError :: e -> SupplyT m a #

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

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

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 # 

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 # 

Methods

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

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

Monad m => Applicative (SupplyT m) Source # 

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 => Alternative (SupplyT m) Source # 

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] #

MonadPlus m => MonadPlus (SupplyT m) Source # 

Methods

mzero :: SupplyT m a #

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

Monad m => MonadSupply (SupplyT m) Source # 

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