ghc-8.4.1.20180329: The GHC API

Safe HaskellNone
LanguageHaskell2010

TcEnv

Contents

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.

Instances
Outputable TyThing Source # 
Instance details

Defined in TyCoRep

NamedThing TyThing Source # 
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.

Instances
Outputable TcTyThing Source # 
Instance details

Defined in TcRnTypes

type TcId = Id Source #

data InstInfo a Source #

Constructors

InstInfo 

Fields

Instances
(SourceTextX a, OutputableBndrId a) => Outputable (InstInfo a) Source # 
Instance details

Defined in TcEnv

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

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

tcExtendIdEnv2 :: [(Name, TcId)] -> TcM a -> TcM a 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.

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.

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.

Orphan instances