purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Control.Monad.Supply.Class

Description

A class for monads supporting a supply of fresh names

# Documentation

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

Minimal complete definition

Nothing

Methods

fresh :: m Integer #

default fresh :: forall (t :: (Type -> Type) -> Type -> Type) (n :: Type -> Type). (MonadTrans t, MonadSupply n, m ~ t n) => m Integer #

peek :: m Integer #

default peek :: forall (t :: (Type -> Type) -> Type -> Type) (n :: Type -> Type). (MonadTrans t, MonadSupply n, m ~ t n) => m Integer #

#### Instances

Instances details

Monad m => MonadSupply (SupplyT m) # |
Instance details Defined in Control.Monad.Supply.Class Methods fresh :: SupplyT m Integer # peek :: SupplyT m Integer #
MonadSupply m => MonadSupply (StateT s m) # |
Instance details Defined in Control.Monad.Supply.Class Methods fresh :: StateT s m Integer # peek :: StateT s m Integer #
(Monoid w, MonadSupply m) => MonadSupply (WriterT w m) # |
Instance details Defined in Control.Monad.Supply.Class Methods fresh :: WriterT w m Integer # peek :: WriterT w m Integer #
(Monoid w, MonadSupply m) => MonadSupply (RWST r w s m) # |
Instance details Defined in Control.Monad.Supply.Class Methods fresh :: RWST r w s m Integer # peek :: RWST r w s m Integer #

freshName :: MonadSupply m => m Text #