SimplMonad

ghc-8.8.4: 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 Source #

#### Instances

Instances details

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 #
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 Source # getUniqueM :: SimplM Unique Source # getUniquesM :: SimplM [Unique] Source #
HasDynFlags SimplM # |
Instance details Defined in SimplMonad 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

Instances details

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

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

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