Moduleghc-9.10.3GHC2021
GHC.Iface.Load
Loading interface files
- 1 type
- 24 values
- Packageghc-9.10.3
- Exports25
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceLoad.hs
Load interface directly for a fully qualified Module. (This is a fairly rare operation, but in particular it is used to load orphan modules in order to pull their instances into the global package table and to handle some operations in GHCi).
Load interfaces for a collection of modules.
Load the interface corresponding to an import directive in
source code. On a failure, fail in the monad with an error message.
Like loadSrcInterface, but returns a MaybeErr.
Loads the interface for a given Name. Should only be called for an imported name; otherwise loadSysInterface may not find the interface
Loads the interface for a given Module.
Loads a system interface and throws an exception if it fails
Loads a user interface and throws an exception if it fails. The first parameter indicates whether we should import the boot variant of the module
findAndReadIface :: HscEnv-> SDocReason for loading the iface (used for tracing)
-> InstalledModuleThe unique identifier of the on-disk module we're looking for
-> ModuleThe *actual* module we're looking for. We use this to check the consistency of the requirements of the module we read out.
-> IsBootInterfaceLooking for .hi-boot or .hi file
-> IO (MaybeErr MissingInterfaceError (ModIface, FilePath))
Write interface file
Compute the signatures which must be compiled in order to
load the interface for a Module. The output of this function
is always a subset of moduleFreeHoles; it is more precise
because in signature p[A=<A>,B=<B>]:B, although the free holes
are A and B, B might not depend on A at all!
If this is invoked on a signature, this does NOT include the
signature itself; e.g. precise free module holes of
p[A=<A>,B=<B>]:B never includes B.
An IfM function to load the home interface for a wired-in thing, so that we're sure that we see its instance declarations and rules See Note [Loading instances for wired-in things]
Reason for loading an interface file
Used to figure out whether we want to consider loading hi-boot files or not.
Instances1Outputable
Outputable WhereFromDefined in ghc-9.10.3 · GHC.Iface.Load
Show a ModIface but don't display details; suitable for ModIfaces stored in the EPT.
Show a ModIface
The UnitState is used to pretty-print units
Read binary interface, and print it out
module GHC.Iface.Errors