diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-03-11 00:27:45 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2020-03-11 09:30:16 +0000 |
commit | 3279f244e6a6f0a8c4ecd2ab597223d6cacd5f4d (patch) | |
tree | 14a178173e3e1d088fae1e6e981d86a4b51b0734 /compiler/GHC/IfaceToCore.hs | |
parent | 3300eeacbbf7a3d1f961f809be5d236c48827b28 (diff) | |
download | haskell-wip/T17871.tar.gz |
Expose compulsory unfoldings alwayswip/T17871
The unsafeCoerce# patch requires that unsafeCoerce# has
a compulsory unfolding that is always available. So we have
to be careful to expose compulsory unfoldings unconditionally
and consistently.
We didn't get this quite right: #17871. This patch fixes
it. No real surprises here.
See Note [Always expose compulsory unfoldings] in GHC.Iface.Tidy
Diffstat (limited to 'compiler/GHC/IfaceToCore.hs')
-rw-r--r-- | compiler/GHC/IfaceToCore.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/IfaceToCore.hs b/compiler/GHC/IfaceToCore.hs index 700d830c9d..1af97d1b6b 100644 --- a/compiler/GHC/IfaceToCore.hs +++ b/compiler/GHC/IfaceToCore.hs @@ -1474,8 +1474,8 @@ tcIdInfo ignore_prags toplvl name ty info = do | otherwise = filter need_prag items need_prag :: IfaceInfoItem -> Bool - -- compulsory unfoldings are really compulsory. - -- See wrinkle in Note [Wiring in unsafeCoerce#] in Desugar + -- Always read in compulsory unfoldings + -- See Note [Always expose compulsory unfoldings] in GHC.Iface.Tidy need_prag (HsUnfold _ (IfCompulsory {})) = True need_prag _ = False |