ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Unit.Module.Imported

Synopsis

- type ImportedMods = Map Module [ImportedBy]
- data ImportedBy
  - = ImportedByUser ImportedModsVal
  - | ImportedBySystem
- data ImportedModsVal = ImportedModsVal {
  - imv_name :: ModuleName
  - imv_span :: SrcSpan
  - imv_is_safe :: IsSafeImport
  - imv_is_level :: ImportLevel
  - imv_is_hiding :: Bool
  - imv_all_exports :: !GlobalRdrEnv
  - imv_qualified :: Bool
  }
- importedByUser :: [ImportedBy] -> [ImportedModsVal]

# Documentation

type ImportedMods = Map Module [ImportedBy] #

Records the modules directly imported by a module for extracting e.g. usage information, and also to give better error message

data ImportedBy #

If a module was "imported" by the user, we associate it with more detailed usage information `ImportedModsVal`; a module imported by the system only gets used for usage information.

Constructors

ImportedByUser ImportedModsVal |
ImportedBySystem |

data ImportedModsVal #

Constructors

ImportedModsVal |
Fields imv_name :: ModuleName The name the module is imported with imv_span :: SrcSpan the source span of the whole import imv_is_safe :: IsSafeImport whether this is a safe import imv_is_level :: ImportLevel the level the module is imported at (splice, quote, or normal) imv_is_hiding :: Bool whether this is an "hiding" import imv_all_exports :: !GlobalRdrEnv all the things the module could provide. NB. BangPattern here: otherwise this leaks. (#15111) imv_qualified :: Bool whether this is a qualified import

importedByUser :: [ImportedBy] -> [ImportedModsVal] #