Equality of forall-types is visibility aware
This patch finally (I hope) nails the question of whether (forall a. ty) and (forall a -> ty) are `eqType`: they aren't! There is a long discussion in #22762, plus useful Notes: * Note [ForAllTy and type equality] in GHC.Core.TyCo.Compare * Note [Comparing visiblities] in GHC.Core.TyCo.Compare * Note [ForAllCo] in GHC.Core.TyCo.Rep It also establishes a helpful new invariant for ForAllCo, and ForAllTy, when the bound variable is a CoVar:in that case the visibility must be coreTyLamForAllTyFlag. All this is well documented in revised Notes.
Showing
- compiler/GHC/Core/Coercion.hs 148 additions, 151 deletionscompiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion.hs-boot 1 addition, 1 deletioncompiler/GHC/Core/Coercion.hs-boot
- compiler/GHC/Core/Coercion/Opt.hs 75 additions, 54 deletionscompiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/FVs.hs 3 additions, 2 deletionscompiler/GHC/Core/FVs.hs
- compiler/GHC/Core/Lint.hs 20 additions, 10 deletionscompiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs 41 additions, 14 deletionscompiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Reduction.hs 2 additions, 2 deletionscompiler/GHC/Core/Reduction.hs
- compiler/GHC/Core/TyCo/Compare.hs 55 additions, 15 deletionscompiler/GHC/Core/TyCo/Compare.hs
- compiler/GHC/Core/TyCo/FVs.hs 7 additions, 6 deletionscompiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/FVs.hs-boot 2 additions, 0 deletionscompiler/GHC/Core/TyCo/FVs.hs-boot
- compiler/GHC/Core/TyCo/Rep.hs 145 additions, 52 deletionscompiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Subst.hs 4 additions, 3 deletionscompiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/TyCo/Tidy.hs 2 additions, 1 deletioncompiler/GHC/Core/TyCo/Tidy.hs
- compiler/GHC/Core/Type.hs 39 additions, 21 deletionscompiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unify.hs 10 additions, 5 deletionscompiler/GHC/Core/Unify.hs
- compiler/GHC/Core/Utils.hs 8 additions, 4 deletionscompiler/GHC/Core/Utils.hs
- compiler/GHC/CoreToIface.hs 6 additions, 3 deletionscompiler/GHC/CoreToIface.hs
- compiler/GHC/Iface/Rename.hs 3 additions, 2 deletionscompiler/GHC/Iface/Rename.hs
- compiler/GHC/Iface/Syntax.hs 1 addition, 1 deletioncompiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Type.hs 26 additions, 14 deletionscompiler/GHC/Iface/Type.hs
Loading
Please register or sign in to comment