diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2022-05-16 13:33:12 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2022-05-16 14:14:13 +0100 |
commit | 93a8f26c29ccb220ce12f0087eb464920097e128 (patch) | |
tree | d9f37f02373a17d534baed098f73eacb94cfc210 /compiler/GHC/Core/TyCon.hs | |
parent | aed356e1b68b2201fa6e3c5bf14079f3f3366b44 (diff) | |
download | haskell-wip/T21575.tar.gz |
Fix bad interaction between withDict and the Specialiserwip/T21575
This MR fixes a bad bug, where the withDict was inlined too
vigorously, which in turn made the type-class Specialiser generate
a bogus specialisation, because it saw the same overloaded function
applied to two /different/ dictionaries.
Solution: inline `withDict` later. See (WD8) of Note [withDict]
in GHC.HsToCore.Expr
See #21575, which is fixed by this change.
Diffstat (limited to 'compiler/GHC/Core/TyCon.hs')
-rw-r--r-- | compiler/GHC/Core/TyCon.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs index e50751c2a0..6514b68aaf 100644 --- a/compiler/GHC/Core/TyCon.hs +++ b/compiler/GHC/Core/TyCon.hs @@ -1184,7 +1184,9 @@ data AlgTyConRhs -- See Note [Newtype eta] nt_co :: CoAxiom Unbranched, -- The axiom coercion that creates the @newtype@ - -- from the representation 'Type'. + -- from the representation 'Type'. The axiom witnesses + -- a representational coercion: + -- nt_co :: N ty1 ~R# rep_tys -- See Note [Newtype coercions] -- Invariant: arity = #tvs in nt_etad_rhs; |