GHC.Linker.Deps

ghc-9.10.0.20240426: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Linker.Deps

Synopsis

- data LinkDepsOpts = LinkDepsOpts {
  - ldObjSuffix :: !String
  - ldOneShotMode :: !Bool
  - ldModuleGraph :: !ModuleGraph
  - ldUnitEnv :: !UnitEnv
  - ldPprOpts :: !SDocContext
  - ldFinderCache :: !FinderCache
  - ldFinderOpts :: !FinderOpts
  - ldUseByteCode :: !Bool
  - ldMsgOpts :: !(DiagnosticOpts IfaceMessage)
  - ldWays :: !Ways
  - ldLoadIface :: SDoc -> Module -> IO (MaybeErr MissingInterfaceError ModIface)
  }
- data LinkDeps = LinkDeps {
  - ldNeededLinkables :: [Linkable]
  - ldAllLinkables :: [Linkable]
  - ldUnits :: [UnitId]
  - ldNeededUnits :: UniqDSet UnitId
  }
- getLinkDeps :: LinkDepsOpts -> Interp -> LoaderState -> SrcSpan -> [Module] -> IO LinkDeps

# Documentation

data LinkDepsOpts Source #

Constructors

LinkDepsOpts |
Fields ldObjSuffix :: !String Suffix of .o files ldOneShotMode :: !Bool Is the driver in one-shot mode? ldModuleGraph :: !ModuleGraph Module graph ldUnitEnv :: !UnitEnv Unit environment ldPprOpts :: !SDocContext Rendering options for error messages ldFinderCache :: !FinderCache Finder cache ldFinderOpts :: !FinderOpts Finder options ldUseByteCode :: !Bool Use bytecode rather than objects ldMsgOpts :: !(DiagnosticOpts IfaceMessage) Options for diagnostics ldWays :: !Ways Enabled ways ldLoadIface :: SDoc -> Module -> IO (MaybeErr MissingInterfaceError ModIface) Interface loader function

data LinkDeps Source #

Constructors

LinkDeps |
Fields ldNeededLinkables :: [Linkable] ldAllLinkables :: [Linkable] ldUnits :: [UnitId] ldNeededUnits :: UniqDSet UnitId

getLinkDeps :: LinkDepsOpts -> Interp -> LoaderState -> SrcSpan -> [Module] -> IO LinkDeps Source #

Find all the packages and linkables that a set of modules depends on

Return the module and package dependencies for the needed modules. See Note [Object File Dependencies]

Fails with an IO exception if it can't find enough files