SimplMonad

ghc-8.6.3: 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
  - getUniqueSupplyM :: m UniqSupply
  - getUniqueM :: m Unique
  - getUniquesM :: m [Unique]
- newId :: FastString -> Type -> SimplM Id
- newJoinId :: [Var] -> 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 # |
Instance details Defined in SimplMonad 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 # |
Instance details Defined in SimplMonad Methods fmap :: (a -> b) -> SimplM a -> SimplM b Source # (<$) :: a -> SimplM b -> SimplM a Source #
Applicative SimplM # |
Instance details Defined in SimplMonad 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 # |
Instance details Defined in SimplMonad Methods liftIO :: IO a -> SimplM a Source #
MonadUnique SimplM # |
Instance details Defined in SimplMonad Methods getUniqueSupplyM :: SimplM UniqSupply # getUniqueM :: SimplM Unique # getUniquesM :: SimplM [Unique] #
HasDynFlags SimplM # |
Instance details Defined in SimplMonad Methods getDynFlags :: SimplM DynFlags #

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 #

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 # |
Instance details Defined in UniqSupply Methods getUniqueSupplyM :: UniqSM UniqSupply # getUniqueM :: UniqSM Unique # getUniquesM :: UniqSM [Unique] #
MonadUnique CoreM # |
Instance details Defined in CoreMonad Methods getUniqueSupplyM :: CoreM UniqSupply # getUniqueM :: CoreM Unique # getUniquesM :: CoreM [Unique] #
MonadUnique LlvmM # |
Instance details Defined in LlvmCodeGen.Base Methods getUniqueSupplyM :: LlvmM UniqSupply # getUniqueM :: LlvmM Unique # getUniquesM :: LlvmM [Unique] #
MonadUnique FCode # |
Instance details Defined in StgCmmMonad Methods getUniqueSupplyM :: FCode UniqSupply # getUniqueM :: FCode Unique # getUniquesM :: FCode [Unique] #
MonadUnique CmmParse # |
Instance details Defined in StgCmmExtCode Methods getUniqueSupplyM :: CmmParse UniqSupply # getUniqueM :: CmmParse Unique # getUniquesM :: CmmParse [Unique] #
MonadUnique SimplM # |
Instance details Defined in SimplMonad Methods getUniqueSupplyM :: SimplM UniqSupply # getUniqueM :: SimplM Unique # getUniquesM :: SimplM [Unique] #
MonadUnique TcS # |
Instance details Defined in TcSMonad Methods getUniqueSupplyM :: TcS UniqSupply # getUniqueM :: TcS Unique # getUniquesM :: TcS [Unique] #
MonadUnique NatM # |
Instance details Defined in NCGMonad Methods getUniqueSupplyM :: NatM UniqSupply # getUniqueM :: NatM Unique # getUniquesM :: NatM [Unique] #
MonadUnique (IOEnv (Env gbl lcl)) # |
Instance details Defined in TcRnMonad Methods getUniqueSupplyM :: IOEnv (Env gbl lcl) UniqSupply # getUniqueM :: IOEnv (Env gbl lcl) Unique # getUniquesM :: IOEnv (Env gbl lcl) [Unique] #

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

newJoinId :: [Var] -> 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 #