SimplMonad

ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

SimplMonad

Synopsis

- data SimplM result
- initSmpl :: DynFlags -> RuleEnv -> (FamInstEnv, FamInstEnv) -> UniqSupply -> Int -> SimplM a -> IO (a, SimplCount)
- traceSmpl :: String -> SDoc -> SimplM ()
- getSimplRules :: SimplM RuleEnv
- getFamEnvs :: SimplM (FamInstEnv, FamInstEnv)
- class Monad m => MonadUnique m where
- 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 Source #

Instances

Monad SimplM # |
Methods (>>=) :: SimplM a -> (a -> SimplM b) -> SimplM b Source # (>>) :: SimplM a -> SimplM b -> SimplM b Source # return :: a -> SimplM a Source # fail :: String -> SimplM a Source #
Functor SimplM # |
Methods fmap :: (a -> b) -> SimplM a -> SimplM b Source # (<$) :: a -> SimplM b -> SimplM a Source #
Applicative SimplM # |
Methods pure :: a -> SimplM a Source # (<*>) :: SimplM (a -> b) -> SimplM a -> SimplM b Source # liftA2 :: (a -> b -> c) -> SimplM a -> SimplM b -> SimplM c Source # (*>) :: SimplM a -> SimplM b -> SimplM b Source # (<*) :: SimplM a -> SimplM b -> SimplM a Source #
MonadIO SimplM # |
Methods liftIO :: IO a -> SimplM a Source #
MonadUnique SimplM # |
Methods getUniqueSupplyM :: SimplM UniqSupply Source # getUniqueM :: SimplM Unique Source # getUniquesM :: SimplM [Unique] Source #
HasDynFlags SimplM # |
Methods getDynFlags :: SimplM DynFlags Source #

initSmpl :: DynFlags -> RuleEnv -> (FamInstEnv, FamInstEnv) -> UniqSupply -> Int -> SimplM a -> IO (a, SimplCount) Source #

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

getSimplRules :: SimplM RuleEnv Source #

getFamEnvs :: SimplM (FamInstEnv, FamInstEnv) Source #

class Monad m => MonadUnique m where Source #

A monad for generating unique identifiers

Minimal complete definition

getUniqueSupplyM

Methods

getUniqueSupplyM :: m UniqSupply Source #

Get a new UniqueSupply

getUniqueM :: m Unique Source #

Get a new unique identifier

getUniquesM :: m [Unique] Source #

Get an infinite list of new unique identifiers

Instances

MonadUnique UniqSM # |
Methods getUniqueSupplyM :: UniqSM UniqSupply Source # getUniqueM :: UniqSM Unique Source # getUniquesM :: UniqSM [Unique] Source #
MonadUnique LlvmM # |
Methods getUniqueSupplyM :: LlvmM UniqSupply Source # getUniqueM :: LlvmM Unique Source # getUniquesM :: LlvmM [Unique] Source #
MonadUnique FCode # |
Methods getUniqueSupplyM :: FCode UniqSupply Source # getUniqueM :: FCode Unique Source # getUniquesM :: FCode [Unique] Source #
MonadUnique CmmParse # |
Methods getUniqueSupplyM :: CmmParse UniqSupply Source # getUniqueM :: CmmParse Unique Source # getUniquesM :: CmmParse [Unique] Source #
MonadUnique CoreM # |
Methods getUniqueSupplyM :: CoreM UniqSupply Source # getUniqueM :: CoreM Unique Source # getUniquesM :: CoreM [Unique] Source #
MonadUnique SimplM # |
Methods getUniqueSupplyM :: SimplM UniqSupply Source # getUniqueM :: SimplM Unique Source # getUniquesM :: SimplM [Unique] Source #
MonadUnique TcS # |
Methods getUniqueSupplyM :: TcS UniqSupply Source # getUniqueM :: TcS Unique Source # getUniquesM :: TcS [Unique] Source #
MonadUnique NatM # |
Methods getUniqueSupplyM :: NatM UniqSupply Source # getUniqueM :: NatM Unique Source # getUniquesM :: NatM [Unique] Source #

newId :: FastString -> Type -> SimplM Id Source #

data SimplCount Source #

tick :: Tick -> SimplM () Source #

freeTick :: Tick -> SimplM () Source #

checkedTick :: Tick -> SimplM () Source #

getSimplCount :: SimplM SimplCount Source #

zeroSimplCount :: DynFlags -> SimplCount Source #

pprSimplCount :: SimplCount -> SDoc Source #

plusSimplCount :: SimplCount -> SimplCount -> SimplCount Source #

isZeroSimplCount :: SimplCount -> Bool Source #