diff options
author | Gergő Érdi <gergo@erdi.hu> | 2022-12-02 03:00:54 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2022-12-13 08:57:41 +0000 |
commit | dfe222ccfb999b2ffce782972137b28c3e2152a0 (patch) | |
tree | 48c703c543ff7cbc03f2737e61dc5fb691ffea6d /compiler/GHC/Iface/Rename.hs | |
parent | c30accc2f8a0585c76cb534beda04fba624bce1c (diff) | |
download | haskell-dfe222ccfb999b2ffce782972137b28c3e2152a0.tar.gz |
Fix loop in the interface representation of some `Unfolding` fieldswip/T22272
As discovered in #22272, dehydration of the unfolding info of a
recursive definition used to involve a traversal of the definition
itself, which in turn involves traversing the unfolding info. Hence,
a loop.
Instead, we now store enough data in the interface that we can produce
the unfolding info without this traversal. See Note [Tying the 'CoreUnfolding' knot]
for details.
Fixes #22272
Co-authored-by: Simon Peyton Jones <simon.peytonjones@gmail.com>
Diffstat (limited to 'compiler/GHC/Iface/Rename.hs')
-rw-r--r-- | compiler/GHC/Iface/Rename.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Rename.hs b/compiler/GHC/Iface/Rename.hs index a14b3959ea..922f8881ff 100644 --- a/compiler/GHC/Iface/Rename.hs +++ b/compiler/GHC/Iface/Rename.hs @@ -596,8 +596,8 @@ rnIfaceInfoItem i = pure i rnIfaceUnfolding :: Rename IfaceUnfolding -rnIfaceUnfolding (IfCoreUnfold src guide if_expr) - = IfCoreUnfold src guide <$> rnIfaceExpr if_expr +rnIfaceUnfolding (IfCoreUnfold src cache guide if_expr) + = IfCoreUnfold src cache guide <$> rnIfaceExpr if_expr rnIfaceUnfolding (IfDFunUnfold bs ops) = IfDFunUnfold <$> rnIfaceBndrs bs <*> mapM rnIfaceExpr ops |