ghc-7.0.3: The GHC API

SimplMonad

Synopsis

- data SimplM result
- initSmpl :: DynFlags -> RuleBase -> (FamInstEnv, FamInstEnv) -> UniqSupply -> SimplM a -> (a, SimplCount)
- getDOptsSmpl :: SimplM DynFlags
- getSimplRules :: SimplM RuleBase
- getFamEnvs :: SimplM (FamInstEnv, FamInstEnv)
- class Monad m => MonadUnique m where
  - getUniqueSupplyM :: m UniqSupply
  - getUniqueM :: m Unique
  - getUniquesM :: m [Unique]
- newId :: FastString -> Type -> SimplM Id
- data SimplCount
- tick :: Tick -> SimplM ()
- freeTick :: Tick -> SimplM ()
- getSimplCount :: SimplM SimplCount
- zeroSimplCount :: DynFlags -> SimplCount
- pprSimplCount :: SimplCount -> SDoc
- plusSimplCount :: SimplCount -> SimplCount -> SimplCount
- isZeroSimplCount :: SimplCount -> Bool

# Documentation

data SimplM result

Instances

Monad SimplM |
MonadUnique SimplM |

initSmpl :: DynFlags -> RuleBase -> (FamInstEnv, FamInstEnv) -> UniqSupply -> SimplM a -> (a, SimplCount)

getDOptsSmpl :: SimplM DynFlags

getSimplRules :: SimplM RuleBase

getFamEnvs :: SimplM (FamInstEnv, FamInstEnv)

class Monad m => MonadUnique m where

A monad for generating unique identifiers

Methods

getUniqueSupplyM :: m UniqSupply

Get a new UniqueSupply

getUniqueM :: m Unique

Get a new unique identifier

getUniquesM :: m [Unique]

Get an infinite list of new unique identifiers

Instances

MonadUnique UniqSM |
MonadUnique FuelMonad |
MonadUnique CoreM |
MonadUnique SimplM |
MonadUnique (IOEnv (Env gbl lcl)) |
MonadUnique (DFM' FuelMonad f) |

newId :: FastString -> Type -> SimplM Id

data SimplCount

tick :: Tick -> SimplM ()

freeTick :: Tick -> SimplM ()

getSimplCount :: SimplM SimplCount

zeroSimplCount :: DynFlags -> SimplCount

pprSimplCount :: SimplCount -> SDoc

plusSimplCount :: SimplCount -> SimplCount -> SimplCount

isZeroSimplCount :: SimplCount -> Bool