ghc-lib-0.20190204: The GHC API, decoupled from GHC versions

Safe HaskellNone
LanguageHaskell2010

TcEnv

Synopsis

Documentation

data TyThing Source #

A global typecheckable-thing, essentially anything that has a name. Not to be confused with a TcTyThing, which is also a typecheckable thing but in the *local* context. See TcEnv for how to retrieve a TyThing given a Name .

Constructors

Instances
Instance details

Defined in TyCoRep

Instance details

Defined in TyCoRep

data TcTyThing Source #

A typecheckable thing available in a local context. Could be AGlobal TyThing , but also lexically scoped variables, etc. See TcEnv for how to retrieve a TyThing given a Name .

Constructors

Instances
Instance details

Defined in TcRnTypes

type TcId = Id Source #

data InstInfo a Source #

Constructors

Instances
Instance details

Defined in TcEnv

iDFunId :: InstInfo a -> DFunId Source #

pprInstInfoDetails :: OutputableBndrId (GhcPass a) => InstInfo (GhcPass a) -> SDoc Source #

simpleInstInfoClsTy :: InstInfo a -> (Class, Type) Source #

simpleInstInfoTy :: InstInfo a -> Type Source #

simpleInstInfoTyCon :: InstInfo a -> TyCon Source #

data InstBindings a Source #

Constructors

tcExtendGlobalEnv :: [TyThing] -> TcM r -> TcM r Source #

tcExtendTyConEnv :: [TyCon] -> TcM r -> TcM r Source #

tcExtendGlobalEnvImplicit :: [TyThing] -> TcM r -> TcM r Source #

setGlobalTypeEnv :: TcGblEnv -> TypeEnv -> TcM TcGblEnv Source #

tcExtendGlobalValEnv :: [Id] -> TcM a -> TcM a Source #

tcLookupLocatedGlobal :: Located Name -> TcM TyThing Source #

tcLookupGlobal :: Name -> TcM TyThing Source #

tcLookupGlobalOnly :: Name -> TcM TyThing Source #

tcLookupTyCon :: Name -> TcM TyCon Source #

Name -> TcM Class Source #

tcLookupDataCon :: Name -> TcM DataCon Source #

tcLookupPatSyn :: Name -> TcM PatSyn Source #

tcLookupConLike :: Name -> TcM ConLike Source #

tcLookupLocatedGlobalId :: Located Name -> TcM Id Source #

tcLookupLocatedTyCon :: Located Name -> TcM TyCon Source #

tcLookupLocatedClass :: Located Name -> TcM Class Source #

tcLookupAxiom :: Name -> TcM (CoAxiom Branched) Source #

lookupGlobal :: HscEnv -> Name -> IO TyThing Source #

ioLookupDataCon :: HscEnv -> Name -> IO DataCon Source #

tcExtendKindEnv :: NameEnv TcTyThing -> TcM r -> TcM r Source #

tcExtendKindEnvList :: [(Name, TcTyThing)] -> TcM r -> TcM r Source #

tcExtendTyVarEnv :: [TyVar] -> TcM r -> TcM r Source #

tcExtendNameTyVarEnv :: [(Name, TcTyVar)] -> TcM r -> TcM r Source #

tcExtendLetEnv :: TopLevelFlag -> TcSigFun -> IsGroupClosed -> [TcId] -> TcM a -> TcM a Source #

tcExtendSigIds :: TopLevelFlag -> [TcId] -> TcM a -> TcM a Source #

tcExtendRecIds :: [(Name, TcId)] -> TcM a -> TcM a Source #

tcExtendIdEnv :: [TcId] -> TcM a -> TcM a Source #

tcExtendIdEnv1 :: Name -> TcId -> TcM a -> TcM a Source #

tcExtendIdEnv2 :: [(Name, TcId)] -> TcM a -> TcM a Source #

tcExtendBinderStack :: [TcBinder] -> TcM a -> TcM a Source #

tcExtendLocalTypeEnv :: TcLclEnv -> [(Name, TcTyThing)] -> TcM TcLclEnv Source #

isTypeClosedLetBndr :: Id -> Bool Source #

tcLookup :: Name -> TcM TcTyThing Source #

tcLookupLocated :: Located Name -> TcM TcTyThing Source #

tcLookupLocalIds :: [Name] -> TcM [TcId] Source #

tcLookupId :: Name -> TcM Id Source #

tcLookupIdMaybe :: Name -> TcM (Maybe Id) Source #

tcLookupTyVar :: Name -> TcM TcTyVar Source #

tcLookupLcl_maybe :: Name -> TcM (Maybe TcTyThing) Source #

getInLocalScope :: TcM (Name -> Bool) Source #

wrongThingErr :: String -> TcTyThing -> Name -> TcM a Source #

pprBinders :: [Name] -> SDoc Source #

tcAddDataFamConPlaceholders :: [LInstDecl GhcRn] -> TcM a -> TcM a Source #

tcAddPatSynPlaceholders :: [PatSynBind GhcRn GhcRn] -> TcM a -> TcM a Source #

getTypeSigNames :: [LSig GhcRn] -> NameSet Source #

tcExtendRecEnv :: [(Name, TyThing)] -> TcM r -> TcM r Source #

tcInitTidyEnv :: TcM TidyEnv Source #

tcInitOpenTidyEnv :: [TyCoVar] -> TcM TidyEnv Source #

Get a TidyEnv that includes mappings for all vars free in the given type. Useful when tidying open types.

tcLookupInstance :: Class -> [Type] -> TcM ClsInst Source #

tcGetInstEnvs :: TcM InstEnvs Source #

tcExtendRules :: [LRuleDecl GhcTc] -> TcM a -> TcM a Source #

tcGetDefaultTys :: TcM ([Type], (Bool, Bool)) Source #

tcGetGlobalTyCoVars :: TcM TcTyVarSet Source #

tcGetGlobalTyCoVars returns a fully-zonked set of *scoped* tyvars free in the environment. To improve subsequent calls to the same function it writes the zonked set back into the environment. Note that this returns all variables free in anything (term-level or type-level) in scope. We thus don't have to worry about clashes with things that are not in scope, because if they are reachable, then they'll be returned here. NB: This is closed over kinds, so it can return unification variables mentioned in the kinds of in-scope tyvars.

checkWellStaged :: SDoc -> ThLevel -> ThLevel -> TcM () Source #

tcMetaTy :: Name -> TcM Type Source #

thLevel :: ThStage -> ThLevel Source #

topIdLvl :: Id -> ThLevel Source #

isBrackStage :: ThStage -> Bool Source #

newDFunName :: Class -> [Type] -> SrcSpan -> TcM Name Source #

Make a name for the dict fun for an instance decl. It's an *external* name, like other top-level names, and hence must be made with newGlobalBinder.

newDFunName' :: Class -> TyCon -> TcM Name Source #

Special case of newDFunName to generate dict fun name for a single TyCon.

newFamInstTyConName :: Located Name -> [Type] -> TcM Name Source #

newFamInstAxiomName :: Located Name -> [[Type]] -> TcM Name Source #

mkStableIdFromString :: String -> Type -> SrcSpan -> (OccName -> OccName) -> TcM TcId Source #

mkStableIdFromName :: Name -> Type -> SrcSpan -> (OccName -> OccName) -> TcM TcId Source #

mkWrapperName :: (MonadIO m, HasDynFlags m, HasModule m) => String -> String -> m FastString Source #

Orphan instances

AltStyle によって変換されたページ (->オリジナル) /