LoadIface

ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

LoadIface

Synopsis

- tcLookupImported_maybe :: Name -> TcM (MaybeErr MsgDoc TyThing)
- importDecl :: Name -> IfM lcl (MaybeErr MsgDoc 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 MsgDoc [ModIface])
- loadInterfaceForName :: SDoc -> Name -> TcRn ModIface
- loadInterfaceForModule :: SDoc -> Module -> TcRn ModIface
- loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr MsgDoc ModIface)
- loadWiredInHomeIface :: Name -> IfM lcl ()
- loadSysInterface :: SDoc -> Module -> IfM lcl ModIface
- loadUserInterface :: Bool -> SDoc -> Module -> IfM lcl ModIface
- loadPluginInterface :: SDoc -> Module -> IfM lcl ModIface
- findAndReadIface :: SDoc -> Module -> IsBootInterface -> TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, FilePath))
- readIface :: Module -> FilePath -> TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)
- loadDecls :: Bool -> [(Fingerprint, IfaceDecl)] -> IfL [(Name, TyThing)]
- initExternalPackageState :: ExternalPackageState
- ifaceStats :: ExternalPackageState -> SDoc
- pprModIface :: ModIface -> SDoc
- showIface :: HscEnv -> FilePath -> IO ()

# Documentation

tcLookupImported_maybe :: Name -> TcM (MaybeErr MsgDoc TyThing)

importDecl :: Name -> IfM lcl (MaybeErr MsgDoc TyThing)

checkWiredInTyCon :: TyCon -> TcM ()

ifCheckWiredInThing :: TyThing -> IfL ()

loadModuleInterface :: SDoc -> Module -> TcM ModIface

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 ()

Load interfaces for a collection of modules.

loadSrcInterface :: SDoc -> ModuleName -> IsBootInterface -> Maybe FastString -> RnM [ModIface]

Load the interface corresponding to an `import` directive in source code. On a failure, fail in the monad with an error message. See Note [Un-ambiguous multiple interfaces] for why the return type is `[ModIface]`

loadSrcInterface_maybe :: SDoc -> ModuleName -> IsBootInterface -> Maybe FastString -> RnM (MaybeErr MsgDoc [ModIface])

Like `loadSrcInterface`, but returns a `MaybeErr`. See also Note [Un-ambiguous multiple interfaces]

loadInterfaceForName :: SDoc -> Name -> TcRn ModIface

Loads the interface for a given Name. Should only be called for an imported name; otherwise loadSysInterface may not find the interface

loadInterfaceForModule :: SDoc -> Module -> TcRn ModIface

Loads the interface for a given Module.

loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr MsgDoc ModIface)

loadWiredInHomeIface :: Name -> IfM lcl ()

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] in TcIface

loadSysInterface :: SDoc -> Module -> IfM lcl ModIface

Loads a system interface and throws an exception if it fails

loadUserInterface :: Bool -> SDoc -> Module -> IfM lcl ModIface

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

findAndReadIface :: SDoc -> Module -> IsBootInterface -> TcRnIf gbl lcl (MaybeErr MsgDoc (ModIface, FilePath))

readIface :: Module -> FilePath -> TcRnIf gbl lcl (MaybeErr MsgDoc ModIface)

loadDecls :: Bool -> [(Fingerprint, IfaceDecl)] -> IfL [(Name, TyThing)]

initExternalPackageState :: ExternalPackageState

ifaceStats :: ExternalPackageState -> SDoc

pprModIface :: ModIface -> SDoc

showIface :: HscEnv -> FilePath -> IO ()

Read binary interface, and print it out