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

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.TypeEnv

Synopsis

- type TypeEnv = NameEnv TyThing
- emptyTypeEnv :: TypeEnv
- lookupTypeEnv :: TypeEnv -> Name -> Maybe TyThing
- mkTypeEnv :: [TyThing] -> TypeEnv
- typeEnvFromEntities :: [Id] -> [TyCon] -> [PatSyn] -> [FamInst] -> TypeEnv
- mkTypeEnvWithImplicits :: [TyThing] -> TypeEnv
- extendTypeEnv :: TypeEnv -> TyThing -> TypeEnv
- extendTypeEnvList :: TypeEnv -> [TyThing] -> TypeEnv
- extendTypeEnvWithIds :: TypeEnv -> [Id] -> TypeEnv
- plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv
- typeEnvElts :: TypeEnv -> [TyThing]
- typeEnvTyCons :: TypeEnv -> [TyCon]
- typeEnvIds :: TypeEnv -> [Id]
- typeEnvPatSyns :: TypeEnv -> [PatSyn]
- typeEnvDataCons :: TypeEnv -> [DataCon]
- typeEnvCoAxioms :: TypeEnv -> [CoAxiom Branched]
- typeEnvClasses :: TypeEnv -> [Class]

# Documentation

type TypeEnv = NameEnv TyThing #

A map from `Name`s to `TyThing`s, constructed by typechecking local declarations or interface files

emptyTypeEnv :: TypeEnv #

lookupTypeEnv :: TypeEnv -> Name -> Maybe TyThing #

mkTypeEnv :: [TyThing] -> TypeEnv #

typeEnvFromEntities :: [Id] -> [TyCon] -> [PatSyn] -> [FamInst] -> TypeEnv #

mkTypeEnvWithImplicits :: [TyThing] -> TypeEnv #

extendTypeEnv :: TypeEnv -> TyThing -> TypeEnv #

extendTypeEnvList :: TypeEnv -> [TyThing] -> TypeEnv #

extendTypeEnvWithIds :: TypeEnv -> [Id] -> TypeEnv #

plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv #

typeEnvElts :: TypeEnv -> [TyThing] #

typeEnvTyCons :: TypeEnv -> [TyCon] #

typeEnvIds :: TypeEnv -> [Id] #

typeEnvPatSyns :: TypeEnv -> [PatSyn] #

typeEnvDataCons :: TypeEnv -> [DataCon] #

typeEnvCoAxioms :: TypeEnv -> [CoAxiom Branched] #

typeEnvClasses :: TypeEnv -> [Class] #