ghc-8.2.2: The GHC API

Safe HaskellNone





data TyThing #

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.

data TcTyThing #

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.

type TcId = Id #

data InstInfo a #





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

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

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

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

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

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

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

tcGetGlobalTyCoVars :: TcM TcTyVarSet #

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 #

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 #

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

Orphan instances