imperative-edsl-0.4.1: Deep embedding of imperative programs with code generation

Safe HaskellNone
LanguageHaskell2010

Control.Monads

Synopsis

Documentation

class Monad m => MonadSupply m where Source

Minimal complete definition

Nothing

Methods

fresh :: m VarId Source

Create a fresh variable identifier

runSupplyT :: Monad m => SupplyT m a -> m a Source

type Loc = Integer Source

Program location

newtype TickT m a Source

Tick monad

Constructors

TickT 

Fields

unTickT :: StateT Loc m a
 

class Monad m => MonadTick m where Source

Minimal complete definition

Nothing

Methods

tick :: m () Source

loc :: m Loc Source

runTickT :: Monad m => TickT m a -> m a Source

runTick :: Tick a -> a Source

freshStr :: MonadSupply m => String -> m String Source

Create a fresh string identifier with the given prefix