ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Unit.Module.Imported

Synopsis

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

# Documentation

type ImportedMods = ModuleEnv [ImportedBy] Source #

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

data ImportedBy Source #

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 Source #

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_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] Source #