diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2021-04-30 12:43:00 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-04 16:00:48 -0400 |
commit | 6acadb79afe685c635fd255f90551a0fbfcbe3dc (patch) | |
tree | 2523292fab1447c3af2bcec3e3ae1deac9d37ecc /compiler/GHC/Core/TyCo/Subst.hs | |
parent | 39020600da32a3207e83f056f16ac42bcc617dc4 (diff) | |
download | haskell-6acadb79afe685c635fd255f90551a0fbfcbe3dc.tar.gz |
Persist CorePrepProv into IfaceUnivCoProv
CorePrepProv is only created in CorePrep, so I thought it wouldn't be
needed in IfaceUnivCoProv. But actually IfaceSyn is used during
pretty-printing, and we can certainly pretty-print things after
CorePrep as #19768 showed.
So the simplest thing is to represent CorePrepProv in IfaceSyn.
To improve what Lint can do I also added a boolean to CorePrepProv, to
record whether it is homogeneously kinded or not. It is introduced in
two distinct ways (see Note [Unsafe coercions] in GHC.CoreToStg.Prep),
one of which may be hetero-kinded (e.g. Int ~ Int#) beause it is
casting a divergent expression; but the other is not. The boolean
keeps track.
Diffstat (limited to 'compiler/GHC/Core/TyCo/Subst.hs')
-rw-r--r-- | compiler/GHC/Core/TyCo/Subst.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/TyCo/Subst.hs b/compiler/GHC/Core/TyCo/Subst.hs index 74fa6d1dfe..e9c9b85a23 100644 --- a/compiler/GHC/Core/TyCo/Subst.hs +++ b/compiler/GHC/Core/TyCo/Subst.hs @@ -852,7 +852,7 @@ subst_co subst co go_prov (PhantomProv kco) = PhantomProv (go kco) go_prov (ProofIrrelProv kco) = ProofIrrelProv (go kco) go_prov p@(PluginProv _) = p - go_prov p@CorePrepProv = p + go_prov p@(CorePrepProv _) = p -- See Note [Substituting in a coercion hole] go_hole h@(CoercionHole { ch_co_var = cv }) |