Safe Haskell | None |
---|---|
Language | Haskell2010 |
Loading interface files
Synopsis
- tcLookupImported_maybe :: Name -> TcM (MaybeErr SDoc TyThing)
- importDecl :: Name -> IfM lcl (MaybeErr SDoc TyThing)
- checkWiredInTyCon :: TyCon -> TcM ()
- ifCheckWiredInThing :: TyThing -> IfL ()
- loadModuleInterface :: SDoc -> Module -> TcM ModIface
- loadModuleInterfaces :: SDoc -> [Module] -> TcM ()
- loadSrcInterface :: SDoc -> ModuleName -> IsBootInterface -> Maybe FastString -> RnM ModIface
- loadSrcInterface_maybe :: SDoc -> ModuleName -> IsBootInterface -> Maybe FastString -> RnM (MaybeErr SDoc ModIface)
- loadInterfaceForName :: SDoc -> Name -> TcRn ModIface
- loadInterfaceForNameMaybe :: SDoc -> Name -> TcRn (Maybe ModIface)
- loadInterfaceForModule :: SDoc -> Module -> TcRn ModIface
- loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr SDoc ModIface)
- loadSysInterface :: SDoc -> Module -> IfM lcl ModIface
- loadUserInterface :: IsBootInterface -> SDoc -> Module -> IfM lcl ModIface
- loadPluginInterface :: SDoc -> Module -> IfM lcl ModIface
- findAndReadIface :: SDoc -> InstalledModule -> Module -> IsBootInterface -> TcRnIf gbl lcl (MaybeErr SDoc (ModIface, FilePath))
- readIface :: Module -> FilePath -> TcRnIf gbl lcl (MaybeErr SDoc ModIface)
- writeIface :: Logger -> DynFlags -> FilePath -> ModIface -> IO ()
- initExternalPackageState :: ExternalPackageState
- moduleFreeHolesPrecise :: SDoc -> Module -> TcRnIf gbl lcl (MaybeErr SDoc (UniqDSet ModuleName))
- needWiredInHomeIface :: TyThing -> Bool
- loadWiredInHomeIface :: Name -> IfM lcl ()
- pprModIfaceSimple :: UnitState -> ModIface -> SDoc
- ifaceStats :: ExternalPackageState -> SDoc
- pprModIface :: UnitState -> ModIface -> SDoc
- showIface :: HscEnv -> FilePath -> IO ()
- cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc
Documentation
tcLookupImported_maybe :: Name -> TcM (MaybeErr SDoc TyThing) Source #
importDecl :: Name -> IfM lcl (MaybeErr SDoc TyThing) Source #
checkWiredInTyCon :: TyCon -> TcM () Source #
ifCheckWiredInThing :: TyThing -> IfL () Source #
loadModuleInterface :: SDoc -> Module -> TcM ModIface Source #
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).
loadModuleInterfaces :: SDoc -> [Module] -> TcM () Source #
Load interfaces for a collection of modules.
loadSrcInterface :: SDoc -> ModuleName -> IsBootInterface -> Maybe FastString -> RnM ModIface Source #
Load the interface corresponding to an import
directive in
source code. On a failure, fail in the monad with an error message.
loadSrcInterface_maybe :: SDoc -> ModuleName -> IsBootInterface -> Maybe FastString -> RnM (MaybeErr SDoc ModIface) Source #
Like loadSrcInterface
, but returns a MaybeErr
.
loadInterfaceForName :: SDoc -> Name -> TcRn ModIface Source #
Loads the interface for a given Name. Should only be called for an imported name; otherwise loadSysInterface may not find the interface
loadInterfaceForNameMaybe :: SDoc -> Name -> TcRn (Maybe ModIface) Source #
Only loads the interface for external non-local names.
loadInterfaceForModule :: SDoc -> Module -> TcRn ModIface Source #
Loads the interface for a given Module.
loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr SDoc ModIface) Source #
loadSysInterface :: SDoc -> Module -> IfM lcl ModIface Source #
Loads a system interface and throws an exception if it fails
loadUserInterface :: IsBootInterface -> SDoc -> Module -> IfM lcl ModIface Source #
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
loadPluginInterface :: SDoc -> Module -> IfM lcl ModIface Source #
findAndReadIface :: SDoc -> InstalledModule -> Module -> IsBootInterface -> TcRnIf gbl lcl (MaybeErr SDoc (ModIface, FilePath)) Source #
initExternalPackageState :: ExternalPackageState Source #
moduleFreeHolesPrecise :: SDoc -> Module -> TcRnIf gbl lcl (MaybeErr SDoc (UniqDSet ModuleName)) Source #
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.
needWiredInHomeIface :: TyThing -> Bool Source #
loadWiredInHomeIface :: Name -> IfM lcl () Source #
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]
pprModIfaceSimple :: UnitState -> ModIface -> SDoc Source #
Show a ModIface but don't display details; suitable for ModIfaces stored in the EPT.
ifaceStats :: ExternalPackageState -> SDoc Source #
pprModIface :: UnitState -> ModIface -> SDoc Source #
Show a ModIface
The UnitState is used to pretty-print units
cannotFindModule :: HscEnv -> ModuleName -> FindResult -> SDoc Source #