NCGMonad

ghc-8.4.0.20171214: The GHC API

Safe Haskell | None
Language | Haskell2010

NCGMonad

# Documentation

data NatM_State Source #

Constructors

NatM_State |
Fields natm_us :: UniqSupply natm_delta :: Int natm_imports :: [CLabel] natm_pic :: Maybe Reg natm_dflags :: DynFlags natm_this_module :: Module natm_modloc :: ModLocation natm_fileid :: DwarfFiles natm_debug_map :: LabelMap DebugBlock

mkNatM_State :: UniqSupply -> Int -> DynFlags -> Module -> ModLocation -> DwarfFiles -> LabelMap DebugBlock -> NatM_State Source #

data NatM result Source #

Instances

Monad NatM # |
Instance details Methods (>>=) :: NatM a -> (a -> NatM b) -> NatM b Source # (>>) :: NatM a -> NatM b -> NatM b Source # return :: a -> NatM a Source # fail :: String -> NatM a Source #
Functor NatM # |
Instance details Methods fmap :: (a -> b) -> NatM a -> NatM b Source # (<$) :: a -> NatM b -> NatM a Source #
Applicative NatM # |
Instance details Methods pure :: a -> NatM a Source # (<*>) :: NatM (a -> b) -> NatM a -> NatM b Source # liftA2 :: (a -> b -> c) -> NatM a -> NatM b -> NatM c Source # (*>) :: NatM a -> NatM b -> NatM b Source # (<*) :: NatM a -> NatM b -> NatM a Source #
MonadUnique NatM # |
Instance details Methods getUniqueSupplyM :: NatM UniqSupply Source # getUniqueM :: NatM Unique Source # getUniquesM :: NatM [Unique] Source #
HasDynFlags NatM # |
Instance details Methods getDynFlags :: NatM DynFlags Source #
CmmMakeDynamicReferenceM NatM # |
Instance details Methods addImport :: CLabel -> NatM () Source # getThisModule :: NatM Module Source #

initNat :: NatM_State -> NatM a -> (a, NatM_State) Source #

addImportNat :: CLabel -> NatM () Source #

getUniqueNat :: NatM Unique Source #

mapAccumLNat :: (acc -> x -> NatM (acc, y)) -> acc -> [x] -> NatM (acc, [y]) Source #

setDeltaNat :: Int -> NatM () Source #

getDeltaNat :: NatM Int Source #

getThisModuleNat :: NatM Module Source #

getBlockIdNat :: NatM BlockId Source #

getNewLabelNat :: NatM CLabel Source #

getNewRegNat :: Format -> NatM Reg Source #

getNewRegPairNat :: Format -> NatM (Reg, Reg) Source #

getPicBaseMaybeNat :: NatM (Maybe Reg) Source #

getPicBaseNat :: Format -> NatM Reg Source #

getDynFlags :: HasDynFlags m => m DynFlags Source #

getModLoc :: NatM ModLocation Source #

getFileId :: FastString -> NatM Int Source #

getDebugBlock :: Label -> NatM (Maybe DebugBlock) Source #

type DwarfFiles = UniqFM (FastString, Int) Source #