Moduleghc-10.0.0.20260917GHC2024
GHC.Tc.Zonk.TcType
Zonking types within the typechecker.
Distinct from the final zonking pass in GHC.Tc.Zonk.Type; see Note [Module structure for zonking] in GHC.Tc.Zonk.Type.
Contents
Synopsis
- value zonkTcType
- value zonkTcTypes
- value zonkScaledTcType
- value zonkTcTyVar
- value zonkTcTyVars
- value zonkTcTyVarToTcTyVar
- value zonkTcTyVarsToTcTyVars
- value zonkInvisTVBinder
- value zonkCo
- value zonkTcTyCon
- value zonkTcTypeAndFV
- value zonkTyCoVarsAndFV
- value zonkTyCoVarsAndFVList
- value zonkDTyCoVarSetAndFV
- value zonkId
- value zonkCoVar
- value zonkTyCoVar
- value zonkTyCoVarKind
- value zonkTyCoVarBndrKind
- value zonkSkolemInfo
- value zonkSkolemInfoAnon
- value zonkCt
- value zonkWC
- value zonkSimples
- value zonkImplication
- value zonkCoHoleSet
- value zonkCtCoHoleSet
- value zonkCtEvCoHoleSet
- value isFilledCoercionHole
- value unpackCoercionHole
- value unpackCoercionHole_maybe
- value tcInitTidyEnv
- value tcInitOpenTidyEnv
- value tidyCt
- value tidyEvVar
- value tidyDelayedError
- value zonkTidyTcType
- value zonkTidyTcTypes
- value zonkTidyHsCtxt
- value zonkTidyOrigin
- value zonkTidyOrigins
- value zonkTidyFRRInfos
- value writeMetaTyVar
- value writeMetaTyVarRef
- value checkCoercionHole
- Packageghc-10.0.0.20260917
- Exports45
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceTcType.hs
Zonking (within the typechecker)
The ZonkM monad and ZonkGblEnv
module GHC.Tc.Zonk.Monad
Zonking types
Zonking TyCons
FreeVars
Zonking CoVars and Ids
zonkId is used *during* typechecking just to zonk the Id's type
Zonking skolem info
Zonking constraints
Rewriter sets
Zonk a rewriter set; if a coercion hole in the set has been filled, find all the free un-filled coercion holes in the coercion that fills it
Coercion holes
Is a coercion hole filled in?
Retrieve the contents of a coercion hole. Panics if the hole is unfilled
Retrieve the contents of a coercion hole, if it is filled
Tidying
Get a TidyEnv that includes mappings for all vars free in the given type. Useful when tidying open types.
Zonk & tidy
Writing to metavariables
writeMetaTyVar :: HasDebugCallStack=> TcTyVarthe type varfiable to write to
-> TcTypethe type to write into the mutable reference
-> ZonkM ()
Write into a currently-empty MetaTyVar.
Works with both type and kind variables.
writeMetaTyVarRef :: HasDebugCallStack=> TcTyVarfor debug assertions only;
-> TcRef MetaDetailsref cell must be for the same tyvar
-> TcTypethe type to write to the mutable reference
-> ZonkM ()
Write into the MetaDetails mutable references of a MetaTv.
Handling coercion holes
Debugging-only! Check that a coercion is appropriate for filling a hole. (The hole itself is needed only for printing.)
Always returns the checked coercion, but this return value is necessary so that the input coercion is forced only when the output is forced.