ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Types.Name.Env

Synopsis

Var, Id and TyVar environments (maps)

type NameEnv a = UniqFM Name a Source #

Name Environment

Manipulating these environments

mkNameEnv :: [(Name, a)] -> NameEnv a Source #

mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a Source #

extendNameEnv_C :: (a -> a -> a) -> NameEnv a -> Name -> a -> NameEnv a Source #

extendNameEnv_Acc :: (a -> b -> b) -> (a -> b) -> NameEnv b -> Name -> a -> NameEnv b Source #

extendNameEnvList_C :: (a -> a -> a) -> NameEnv a -> [(Name, a)] -> NameEnv a Source #

filterNameEnv :: (elt -> Bool) -> NameEnv elt -> NameEnv elt Source #

anyNameEnv :: (elt -> Bool) -> NameEnv elt -> Bool Source #

extendNameEnvListWith :: (a -> Name) -> NameEnv a -> [a] -> NameEnv a Source #

plusNameEnv_C :: (a -> a -> a) -> NameEnv a -> NameEnv a -> NameEnv a Source #

plusNameEnv_CD :: (a -> a -> a) -> NameEnv a -> a -> NameEnv a -> a -> NameEnv a Source #

plusNameEnv_CD2 :: (Maybe a -> Maybe a -> a) -> NameEnv a -> NameEnv a -> NameEnv a Source #

alterNameEnv :: (Maybe a -> Maybe a) -> NameEnv a -> Name -> NameEnv a Source #

plusNameEnvListWith :: (a -> a -> a) -> [NameEnv a] -> NameEnv a Source #

mapNameEnv :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2 Source #

seqEltsNameEnv :: (elt -> ()) -> NameEnv elt -> () Source #

type DNameEnv a = UniqDFM Name a Source #

Deterministic Name Environment

See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need DNameEnv.

mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b Source #

adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a Source #

extendDNameEnv_C :: (a -> a -> a) -> DNameEnv a -> Name -> a -> DNameEnv a Source #

plusDNameEnv_C :: (elt -> elt -> elt) -> DNameEnv elt -> DNameEnv elt -> DNameEnv elt Source #

foldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b Source #

nonDetStrictFoldDNameEnv :: (a -> b -> b) -> b -> DNameEnv a -> b Source #

Dependency analysis

depAnal :: (node -> [Name]) -> (node -> [Name]) -> [node] -> [SCC node] Source #