ghc-lib-parser-9.12.2.20250421: 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 Source #

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

emptyTypeEnv :: TypeEnv Source #

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

mkTypeEnv :: [TyThing] -> TypeEnv Source #

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

mkTypeEnvWithImplicits :: [TyThing] -> TypeEnv Source #

extendTypeEnv :: TypeEnv -> TyThing -> TypeEnv Source #

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

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

plusTypeEnv :: TypeEnv -> TypeEnv -> TypeEnv Source #

typeEnvElts :: TypeEnv -> [TyThing] Source #

typeEnvTyCons :: TypeEnv -> [TyCon] Source #

typeEnvIds :: TypeEnv -> [Id] Source #

typeEnvPatSyns :: TypeEnv -> [PatSyn] Source #

typeEnvDataCons :: TypeEnv -> [DataCon] Source #

typeEnvCoAxioms :: TypeEnv -> [CoAxiom Branched] Source #

typeEnvClasses :: TypeEnv -> [Class] Source #