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

Safe Haskell | Ignore
Language | GHC2021

GHC.Unit.Module.Env

Contents

- Module mappings
- ModuleName mappings
- Sets of Modules
- InstalledModuleEnv
- InstalledModuleWithIsBootEnv

Description

Module environment

Synopsis

- data ModuleEnv elt
- elemModuleEnv :: Module -> ModuleEnv a -> Bool
- extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a
- extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a
- plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a
- delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a
- plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a
- lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a
- lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a
- mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b
- mkModuleEnv :: [(Module, a)] -> ModuleEnv a
- emptyModuleEnv :: ModuleEnv a
- alterModuleEnv :: (Maybe a -> Maybe a) -> Module -> ModuleEnv a -> ModuleEnv a
- partitionModuleEnv :: (a -> Bool) -> ModuleEnv a -> (ModuleEnv a, ModuleEnv a)
- moduleEnvKeys :: ModuleEnv a -> [Module]
- moduleEnvElts :: ModuleEnv a -> [a]
- moduleEnvToList :: ModuleEnv a -> [(Module, a)]
- unitModuleEnv :: Module -> a -> ModuleEnv a
- isEmptyModuleEnv :: ModuleEnv a -> Bool
- extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a
- filterModuleEnv :: (Module -> a -> Bool) -> ModuleEnv a -> ModuleEnv a
- mapMaybeModuleEnv :: (Module -> a -> Maybe b) -> ModuleEnv a -> ModuleEnv b
- type ModuleNameEnv elt = UniqFM ModuleName elt
- type DModuleNameEnv elt = UniqDFM ModuleName elt
- type ModuleSet = Set NDModule
- emptyModuleSet :: ModuleSet
- mkModuleSet :: [Module] -> ModuleSet
- moduleSetElts :: ModuleSet -> [Module]
- extendModuleSet :: ModuleSet -> Module -> ModuleSet
- extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet
- delModuleSet :: ModuleSet -> Module -> ModuleSet
- elemModuleSet :: Module -> ModuleSet -> Bool
- intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet
- unitModuleSet :: Module -> ModuleSet
- isEmptyModuleSet :: ModuleSet -> Bool
- unionManyModuleSets :: [ModuleSet] -> ModuleSet
- data InstalledModuleEnv elt
- emptyInstalledModuleEnv :: InstalledModuleEnv a
- lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a
- extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a
- filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a
- delInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> InstalledModuleEnv a
- mergeInstalledModuleEnv :: (elta -> eltb -> Maybe eltc) -> (InstalledModuleEnv elta -> InstalledModuleEnv eltc) -> (InstalledModuleEnv eltb -> InstalledModuleEnv eltc) -> InstalledModuleEnv elta -> InstalledModuleEnv eltb -> InstalledModuleEnv eltc
- plusInstalledModuleEnv :: (elt -> elt -> elt) -> InstalledModuleEnv elt -> InstalledModuleEnv elt -> InstalledModuleEnv elt
- installedModuleEnvElts :: InstalledModuleEnv a -> [(InstalledModule, a)]
- data InstalledModuleWithIsBootEnv elt
- emptyInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a
- lookupInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> Maybe a
- extendInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> a -> InstalledModuleWithIsBootEnv a
- filterInstalledModuleWithIsBootEnv :: (InstalledModuleWithIsBoot -> a -> Bool) -> InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBootEnv a
- delInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> InstalledModuleWithIsBootEnv a
- mergeInstalledModuleWithIsBootEnv :: (elta -> eltb -> Maybe eltc) -> (InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltc) -> (InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc) -> InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc
- plusInstalledModuleWithIsBootEnv :: (elt -> elt -> elt) -> InstalledModuleWithIsBootEnv elt -> InstalledModuleWithIsBootEnv elt -> InstalledModuleWithIsBootEnv elt
- installedModuleWithIsBootEnvElts :: InstalledModuleWithIsBootEnv a -> [(InstalledModuleWithIsBoot, a)]

# Module mappings

data ModuleEnv elt Source #

A map keyed off of `Module`s

#### Instances

Instances details

Outputable a => Outputable (ModuleEnv a) Source # |
Instance details Defined in GHC.Unit.Module.Env Methods ppr :: ModuleEnv a -> SDoc Source #

elemModuleEnv :: Module -> ModuleEnv a -> Bool Source #

extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a Source #

extendModuleEnvList :: ModuleEnv a -> [(Module, a)] -> ModuleEnv a Source #

extendModuleEnvList_C :: (a -> a -> a) -> ModuleEnv a -> [(Module, a)] -> ModuleEnv a Source #

plusModuleEnv_C :: (a -> a -> a) -> ModuleEnv a -> ModuleEnv a -> ModuleEnv a Source #

delModuleEnvList :: ModuleEnv a -> [Module] -> ModuleEnv a Source #

delModuleEnv :: ModuleEnv a -> Module -> ModuleEnv a Source #

plusModuleEnv :: ModuleEnv a -> ModuleEnv a -> ModuleEnv a Source #

lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a Source #

lookupWithDefaultModuleEnv :: ModuleEnv a -> a -> Module -> a Source #

mapModuleEnv :: (a -> b) -> ModuleEnv a -> ModuleEnv b Source #

mkModuleEnv :: [(Module, a)] -> ModuleEnv a Source #

emptyModuleEnv :: ModuleEnv a Source #

alterModuleEnv :: (Maybe a -> Maybe a) -> Module -> ModuleEnv a -> ModuleEnv a Source #

partitionModuleEnv :: (a -> Bool) -> ModuleEnv a -> (ModuleEnv a, ModuleEnv a) Source #

moduleEnvKeys :: ModuleEnv a -> [Module] Source #

moduleEnvElts :: ModuleEnv a -> [a] Source #

moduleEnvToList :: ModuleEnv a -> [(Module, a)] Source #

unitModuleEnv :: Module -> a -> ModuleEnv a Source #

isEmptyModuleEnv :: ModuleEnv a -> Bool Source #

extendModuleEnvWith :: (a -> a -> a) -> ModuleEnv a -> Module -> a -> ModuleEnv a Source #

filterModuleEnv :: (Module -> a -> Bool) -> ModuleEnv a -> ModuleEnv a Source #

mapMaybeModuleEnv :: (Module -> a -> Maybe b) -> ModuleEnv a -> ModuleEnv b Source #

# ModuleName mappings

type ModuleNameEnv elt = UniqFM ModuleName elt Source #

A map keyed off of `ModuleName`s (actually, their `Unique`s)

type DModuleNameEnv elt = UniqDFM ModuleName elt Source #

A map keyed off of `ModuleName`s (actually, their `Unique`s) Has deterministic folds and can be deterministically converted to a list

# Sets of Modules

type ModuleSet = Set NDModule Source #

A set of `Module`s

emptyModuleSet :: ModuleSet Source #

mkModuleSet :: [Module] -> ModuleSet Source #

moduleSetElts :: ModuleSet -> [Module] Source #

extendModuleSet :: ModuleSet -> Module -> ModuleSet Source #

extendModuleSetList :: ModuleSet -> [Module] -> ModuleSet Source #

delModuleSet :: ModuleSet -> Module -> ModuleSet Source #

elemModuleSet :: Module -> ModuleSet -> Bool Source #

intersectModuleSet :: ModuleSet -> ModuleSet -> ModuleSet Source #

minusModuleSet :: ModuleSet -> ModuleSet -> ModuleSet Source #

unionModuleSet :: ModuleSet -> ModuleSet -> ModuleSet Source #

unitModuleSet :: Module -> ModuleSet Source #

isEmptyModuleSet :: ModuleSet -> Bool Source #

unionManyModuleSets :: [ModuleSet] -> ModuleSet Source #

# InstalledModuleEnv

data InstalledModuleEnv elt Source #

A map keyed off of `InstalledModule`

#### Instances

Instances details

Outputable elt => Outputable (InstalledModuleEnv elt) Source # |
Instance details Defined in GHC.Unit.Module.Env Methods ppr :: InstalledModuleEnv elt -> SDoc Source #

emptyInstalledModuleEnv :: InstalledModuleEnv a Source #

lookupInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> Maybe a Source #

extendInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> a -> InstalledModuleEnv a Source #

filterInstalledModuleEnv :: (InstalledModule -> a -> Bool) -> InstalledModuleEnv a -> InstalledModuleEnv a Source #

delInstalledModuleEnv :: InstalledModuleEnv a -> InstalledModule -> InstalledModuleEnv a Source #

mergeInstalledModuleEnv :: (elta -> eltb -> Maybe eltc) -> (InstalledModuleEnv elta -> InstalledModuleEnv eltc) -> (InstalledModuleEnv eltb -> InstalledModuleEnv eltc) -> InstalledModuleEnv elta -> InstalledModuleEnv eltb -> InstalledModuleEnv eltc Source #

plusInstalledModuleEnv :: (elt -> elt -> elt) -> InstalledModuleEnv elt -> InstalledModuleEnv elt -> InstalledModuleEnv elt Source #

installedModuleEnvElts :: InstalledModuleEnv a -> [(InstalledModule, a)] Source #

# InstalledModuleWithIsBootEnv

data InstalledModuleWithIsBootEnv elt Source #

A map keyed off of `InstalledModuleWithIsBoot`

#### Instances

Instances details

Outputable elt => Outputable (InstalledModuleWithIsBootEnv elt) Source # |
Instance details Defined in GHC.Unit.Module.Env Methods ppr :: InstalledModuleWithIsBootEnv elt -> SDoc Source #

emptyInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a Source #

lookupInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> Maybe a Source #

extendInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> a -> InstalledModuleWithIsBootEnv a Source #

filterInstalledModuleWithIsBootEnv :: (InstalledModuleWithIsBoot -> a -> Bool) -> InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBootEnv a Source #

delInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> InstalledModuleWithIsBootEnv a Source #

mergeInstalledModuleWithIsBootEnv :: (elta -> eltb -> Maybe eltc) -> (InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltc) -> (InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc) -> InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc Source #

plusInstalledModuleWithIsBootEnv :: (elt -> elt -> elt) -> InstalledModuleWithIsBootEnv elt -> InstalledModuleWithIsBootEnv elt -> InstalledModuleWithIsBootEnv elt Source #

installedModuleWithIsBootEnvElts :: InstalledModuleWithIsBootEnv a -> [(InstalledModuleWithIsBoot, a)] Source #