ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

NCGMonad

# Documentation

data NatM_State #

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 #

data NatM result #

Instances

Monad NatM # |
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 # |
Methods fmap :: (a -> b) -> NatM a -> NatM b Source # (<$) :: a -> NatM b -> NatM a Source #
Applicative NatM # |
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 # |
Methods getUniqueSupplyM :: NatM UniqSupply # getUniqueM :: NatM Unique # getUniquesM :: NatM [Unique] #
HasDynFlags NatM # |
Methods getDynFlags :: NatM DynFlags #
CmmMakeDynamicReferenceM NatM # |
Methods addImport :: CLabel -> NatM () # getThisModule :: NatM Module #

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

addImportNat :: CLabel -> NatM () #

getUniqueNat :: NatM Unique #

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

setDeltaNat :: Int -> NatM () #

getDeltaNat :: NatM Int #

getThisModuleNat :: NatM Module #

getBlockIdNat :: NatM BlockId #

getNewLabelNat :: NatM CLabel #

getNewRegNat :: Format -> NatM Reg #

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

getPicBaseMaybeNat :: NatM (Maybe Reg) #

getPicBaseNat :: Format -> NatM Reg #

getDynFlags :: HasDynFlags m => m DynFlags #

getModLoc :: NatM ModLocation #

getFileId :: FastString -> NatM Int #

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

type DwarfFiles = UniqFM (FastString, Int) #