GHC.Iface.Make

ghc-9.14.0.20251028: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Iface.Make

Description

Module for constructing `ModIface` values (interface files), writing them to disk and comparing two versions to see if recompilation is required.

Synopsis

- mkPartialIface :: HscEnv -> CoreProgram -> ModDetails -> ModSummary -> [ImportUserSpec] -> ModGuts -> IO PartialModIface
- mkFullIface :: HscEnv -> PartialModIface -> Maybe StgCgInfos -> Maybe CmmCgInfos -> ForeignStubs -> [(ForeignSrcLang, FilePath)] -> IO ModIface
- mkIfaceTc :: HscEnv -> SafeHaskellMode -> ModDetails -> ModSummary -> Maybe CoreProgram -> TcGblEnv -> IO ModIface
- mkRecompUsageInfo :: HscEnv -> TcGblEnv -> IO (Maybe [Usage])
- mkIfaceExports :: [AvailInfo] -> [IfaceExport]

# Documentation

mkPartialIface :: HscEnv -> CoreProgram -> ModDetails -> ModSummary -> [ImportUserSpec] -> ModGuts -> IO PartialModIface Source #

mkFullIface :: HscEnv -> PartialModIface -> Maybe StgCgInfos -> Maybe CmmCgInfos -> ForeignStubs -> [(ForeignSrcLang, FilePath)] -> IO ModIface Source #

Fully instantiate an interface. Adds fingerprints and potentially code generator produced information.

CmmCgInfos is not available when not generating code (-fno-code), or when not generating interface pragmas (-fomit-interface-pragmas). See also Note [Conveying CAF-info and LFInfo between modules] in GHC.StgToCmm.Types.

mkIfaceTc :: HscEnv -> SafeHaskellMode -> ModDetails -> ModSummary -> Maybe CoreProgram -> TcGblEnv -> IO ModIface Source #

Make an interface from the results of typechecking only. Useful for non-optimising compilation, or where we aren't generating any object code at all (`NoBackend`).

mkRecompUsageInfo :: HscEnv -> TcGblEnv -> IO (Maybe [Usage]) Source #

mkIfaceExports :: [AvailInfo] -> [IfaceExport] Source #