GHC.Tc.Utils.Env
Documentation
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 GHC.Tc.Utils.Env for how to retrieve
a TyThing
given a Name
.
Instances
A typecheckable thing available in a local context. Could be
AGlobal
TyThing
, but also lexically scoped variables, etc.
See GHC.Tc.Utils.Env for how to retrieve a TyThing
given a Name
.
Constructors
AGlobal TyThing | |
ATcId | |
Fields
| |
ATyVar Name TcTyVar | |
ATcTyCon TyCon | |
APromotionErr PromotionErr |
Instances
Constructors
InstInfo | |
Fields
|
Instances
OutputableBndrId a => Outputable (InstInfo (GhcPass a)) Source # | |
pprInstInfoDetails :: OutputableBndrId a => InstInfo (GhcPass a) -> SDoc Source #
simpleInstInfoTy :: InstInfo a -> Type Source #
simpleInstInfoTyCon :: InstInfo a -> TyCon Source #
data InstBindings a Source #
Constructors
InstBindings | |
Fields
|
tcExtendLetEnv :: TopLevelFlag -> TcSigFun -> IsGroupClosed -> [TcId] -> TcM a -> TcM a Source #
tcExtendSigIds :: TopLevelFlag -> [TcId] -> TcM a -> TcM a Source #
isTypeClosedLetBndr :: Id -> Bool Source #
tcCheckUsage :: Name -> Mult -> TcM a -> TcM (a, HsWrapper) Source #
tcCheckUsage name mult thing_inside
runs thing_inside
, checks that the
usage of name
is a submultiplicity of mult
, and removes name
from the
usage environment. See also Note [Wrapper returned from tcSubMult] in
GHC.Tc.Utils.Unify, which applies to the wrapper returned from this function.
tcLookupTcTyCon :: HasDebugCallStack => Name -> TcM TcTyCon Source #
pprBinders :: [Name] -> SDoc Source #
tcAddPatSynPlaceholders :: [PatSynBind GhcRn GhcRn] -> 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.
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.
mkWrapperName :: (MonadIO m, HasModule m) => IORef (ModuleEnv Int) -> String -> String -> m FastString Source #
mkWrapperName ref what nameBase
See Note [Generating fresh names for ccall wrapper] for ref
's purpose.