GHC.Unit.Home.ModInfo

ghc-9.2.2: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Unit.Home.ModInfo

Description

Info about modules in the "home" unit

Synopsis

- data HomeModInfo = HomeModInfo {
  - hm_iface :: !ModIface
  - hm_details :: ModDetails
  - hm_linkable :: !(Maybe Linkable)
  }
- type HomePackageTable = DModuleNameEnv HomeModInfo
- emptyHomePackageTable :: HomePackageTable
- lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo
- eltsHpt :: HomePackageTable -> [HomeModInfo]
- filterHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> HomePackageTable
- allHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> Bool
- anyHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> Bool
- mapHpt :: (HomeModInfo -> HomeModInfo) -> HomePackageTable -> HomePackageTable
- delFromHpt :: HomePackageTable -> ModuleName -> HomePackageTable
- addToHpt :: HomePackageTable -> ModuleName -> HomeModInfo -> HomePackageTable
- addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable
- lookupHptDirectly :: HomePackageTable -> Unique -> Maybe HomeModInfo
- lookupHptByModule :: HomePackageTable -> Module -> Maybe HomeModInfo
- listToHpt :: [(ModuleName, HomeModInfo)] -> HomePackageTable
- pprHPT :: HomePackageTable -> SDoc

# Documentation

data HomeModInfo Source #

Information about modules in the package being compiled

Constructors

HomeModInfo |
Fields hm_iface :: !ModIface The basic loaded interface file: every loaded module has one of these, even if it is imported from another package hm_details :: ModDetails Extra information that has been created from the `ModIface_` for the module, typically during typechecking hm_linkable :: !(Maybe Linkable) The actual artifact we would like to link to access things in this module. `hm_linkable` might be Nothing: If this is an .hs-boot module Temporarily during compilation if we pruned away the old linkable because it was out of date. After a complete compilation (`load`), all `hm_linkable` fields in the `HomePackageTable` will be `Just`. When re-linking a module (`HscNoRecomp`), we construct the `HomeModInfo` by building a new `ModDetails` from the old `ModIface_` (only).

type HomePackageTable = DModuleNameEnv HomeModInfo Source #

Helps us find information about modules in the home package

emptyHomePackageTable :: HomePackageTable Source #

Constructs an empty HomePackageTable

lookupHpt :: HomePackageTable -> ModuleName -> Maybe HomeModInfo Source #

eltsHpt :: HomePackageTable -> [HomeModInfo] Source #

filterHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> HomePackageTable Source #

allHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> Bool Source #

anyHpt :: (HomeModInfo -> Bool) -> HomePackageTable -> Bool Source #

mapHpt :: (HomeModInfo -> HomeModInfo) -> HomePackageTable -> HomePackageTable Source #

delFromHpt :: HomePackageTable -> ModuleName -> HomePackageTable Source #

addToHpt :: HomePackageTable -> ModuleName -> HomeModInfo -> HomePackageTable Source #

addListToHpt :: HomePackageTable -> [(ModuleName, HomeModInfo)] -> HomePackageTable Source #

lookupHptDirectly :: HomePackageTable -> Unique -> Maybe HomeModInfo Source #

lookupHptByModule :: HomePackageTable -> Module -> Maybe HomeModInfo Source #

listToHpt :: [(ModuleName, HomeModInfo)] -> HomePackageTable Source #

pprHPT :: HomePackageTable -> SDoc Source #