ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

SimplMonad

Synopsis

- data SimplM result
- initSmpl :: DynFlags -> RuleBase -> (FamInstEnv, FamInstEnv) -> UniqSupply -> Int -> SimplM a -> IO (a, SimplCount)
- traceSmpl :: String -> SDoc -> SimplM ()
- 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 ()
- checkedTick :: 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 |
Functor SimplM |
Applicative SimplM |
MonadIO SimplM |
MonadUnique SimplM |
HasDynFlags SimplM |

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

traceSmpl :: String -> SDoc -> SimplM ()

getSimplRules :: SimplM RuleBase

getFamEnvs :: SimplM (FamInstEnv, FamInstEnv)

class Monad m => MonadUnique m where

A monad for generating unique identifiers

Minimal complete definition

getUniqueSupplyM

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 CoreM |
MonadUnique SimplM |
MonadUnique TcS |

newId :: FastString -> Type -> SimplM Id

data SimplCount

tick :: Tick -> SimplM ()

freeTick :: Tick -> SimplM ()

checkedTick :: Tick -> SimplM ()

getSimplCount :: SimplM SimplCount

zeroSimplCount :: DynFlags -> SimplCount

pprSimplCount :: SimplCount -> SDoc

plusSimplCount :: SimplCount -> SimplCount -> SimplCount

isZeroSimplCount :: SimplCount -> Bool