vacuum-0.0.8: Extract graph representations of ghc heap values.Source codeContentsIndex
GHC.Vacuum.GHC.Internal
Description
Want this module to be as isolated as possible, due to the extreme volatility of the GHC-API.
Synopsis
data GhcApiCfg = GhcApiCfg {
ghcApiLibDir :: FilePath
ghcApiImports :: [CabalPkg]
ghcApiDynFlagsOn :: [DynFlag]
ghcApiDynFlagsOff :: [DynFlag]
}
defaultGhcApiConfig :: GhcApiCfg
withGhcApiCfg :: GhcApiCfg -> (FilePath -> DynFlags -> [Module] -> o) -> DynFlags -> o
dynFlagsOn :: [DynFlag] -> DynFlags -> DynFlags
dynFlagsOff :: [DynFlag] -> DynFlags -> DynFlags
defaultEnv :: IO HscEnv
newEnv :: GhcApiCfg -> Maybe DynFlags -> IO HscEnv
myRunGhc :: HscEnv -> Ghc a -> IO a
data CabalPkg = CabalPkg {
cabalPkgPkg :: CabalPkgId
cabalPkgVersion :: CabalPkgVersion
cabalPkgModules :: [CabalModuleId]
}
type CabalPkgId = String
type CabalPkgVersion = [Int]
type CabalModuleId = String
data CabalModule = CabalModule CabalPkgId CabalPkgVersion CabalModuleId
cabalModulePkgId :: CabalModule -> CabalPkgId
cabalModulePkgVersion :: CabalModule -> CabalPkgVersion
cabalModuleModuleId :: CabalModule -> CabalModuleId
preludeCM :: CabalModule
collectCabalModules :: [CabalModule] -> [CabalPkg]
cabalPkgToModules :: CabalPkg -> [Module]
dataConInfoPtrToNames :: Ptr () -> IO (String, String, String)
Documentation
data GhcApiCfg Source
Constructors
GhcApiCfg
ghcApiLibDir :: FilePath
ghcApiImports :: [CabalPkg]
ghcApiDynFlagsOn :: [DynFlag]
ghcApiDynFlagsOff :: [DynFlag]
show/hide Instances
defaultGhcApiConfig :: GhcApiCfgSource
withGhcApiCfg :: GhcApiCfg -> (FilePath -> DynFlags -> [Module] -> o) -> DynFlags -> oSource
dynFlagsOn :: [DynFlag] -> DynFlags -> DynFlagsSource
dynFlagsOff :: [DynFlag] -> DynFlags -> DynFlagsSource
defaultEnv :: IO HscEnvSource
newEnv :: GhcApiCfg -> Maybe DynFlags -> IO HscEnvSource
myRunGhc :: HscEnv -> Ghc a -> IO aSource
data CabalPkg Source
Constructors
CabalPkg
cabalPkgPkg :: CabalPkgId
cabalPkgVersion :: CabalPkgVersion
cabalPkgModules :: [CabalModuleId]
show/hide Instances
type CabalPkgId = StringSource
type CabalPkgVersion = [Int]Source
type CabalModuleId = StringSource
data CabalModule Source
Constructors
CabalModule CabalPkgId CabalPkgVersion CabalModuleId
show/hide Instances
cabalModulePkgId :: CabalModule -> CabalPkgIdSource
cabalModulePkgVersion :: CabalModule -> CabalPkgVersionSource
cabalModuleModuleId :: CabalModule -> CabalModuleIdSource
preludeCM :: CabalModuleSource
collectCabalModules :: [CabalModule] -> [CabalPkg]Source
cabalPkgToModules :: CabalPkg -> [Module]Source
dataConInfoPtrToNames :: Ptr () -> IO (String, String, String)Source

Given a data constructor in the heap, find its Name. The info tables for data constructors have a field which records the source name of the constructor as a Ptr Word8 (UTF-8 encoded string). The format is:

Package:Module.Name

We use this string to lookup the interpreter's internal representation of the name using the lookupOrig.

Produced by Haddock version 2.4.2