b25c9866
by Simon Peyton Jones at 2026-08-03T17:00:50+01:00
Implement substitution via TyCoMapper
This is a significant bit of refactoring. The dependencies look like this,
where each module depends on one above
Defines Needs
---------------------------------------------------
GHC.Core.TyCo.Rep Type, Coercion
TyCoFolder
GHC.Core.TyCo.FVs Free-var finders TyCoFolder
GHC.Core.TyCo.Make Lots of mkX functions Free vars
TyCoMapper
GHC.Core.TyCo.Subst Substitution TyCoMapper, mkX functions
GHC.Core.Type coreView, typeKind Substitution
coercionKind
GHC.Core.TyCo.Compare Comparison coreView
Some `mkX` functions (such as `mkLRCo`, `mkInstCo`, `mkCastTy`) use
substitution, and so are defined in GHC.Core.Type via a hs-boot import.