ghc-9.15: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Driver.Session.Inspect

Description

GHC API utilities for inspecting the GHC session

Synopsis

Documentation

getModuleGraph :: GhcMonad m => m ModuleGraph Source #

Get the module dependency graph.

isLoaded :: GhcMonad m => ModuleName -> m Bool Source #

Deprecated: Prefer isLoadedModule and isLoadedHomeModule

Return True <==> module is loaded.

isLoadedModule :: GhcMonad m => UnitId -> ModuleName -> m Bool Source #

Check whether a ModuleName is found in the HomePackageTable for the given UnitId.

isLoadedHomeModule :: GhcMonad m => Module -> m Bool Source #

Check whether Module is part of the HomeUnitGraph.

Similar to isLoadedModule, but for Modules.

getBindings :: GhcMonad m => m [TyThing] Source #

Return the bindings for the current interactive session.

getInsts :: GhcMonad m => m ([ClsInst], [FamInst]) Source #

Return the instances for the current interactive session.

getModuleInfo :: GhcMonad m => Module -> m (Maybe ModuleInfo) Source #

Request information about a loaded Module

modInfoTyThings :: ModuleInfo -> [TyThing] Source #

The list of top-level entities defined in a module

modInfoInstances :: ModuleInfo -> [ClsInst] Source #

Returns the instances defined by the specified module. Warning: currently unimplemented for package modules.

modInfoSafe :: ModuleInfo -> SafeHaskellMode Source #

Retrieve module safe haskell mode