Moduleghc-9.10.3GHC2021
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.
- 37 values
- Packageghc-9.10.3
- Exports37
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceTcType.hs
Zonking (within the typechecker)
0 declarationsThe 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
Tidying
5 declarationsGet a TidyEnv that includes mappings for all vars free in the given type. Useful when tidying open types.
Zonk & tidy
Writing to metavariables
2 declarationswriteMetaTyVar :: 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
1 declarationCheck 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.