diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2021-07-23 23:33:10 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-30 13:44:14 -0400 |
commit | 80ba50c7f589c3a1ee95619d24f350368c9b9759 (patch) | |
tree | 69125fd7c6527fb9a1226b01cf6e095a11e7b772 /compiler | |
parent | 610a2b83944493678d9c0540b53d17948e425d90 (diff) | |
download | haskell-80ba50c7f589c3a1ee95619d24f350368c9b9759.tar.gz |
Comments and white space
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Core/Lint.hs | 1 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/OccurAnal.hs | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs index 76d961c91e..6fcd8aca96 100644 --- a/compiler/GHC/Core/Lint.hs +++ b/compiler/GHC/Core/Lint.hs @@ -2056,7 +2056,6 @@ try to trim the forall'd binder list. Note [Rules for join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - A join point cannot be partially applied. However, the left-hand side of a rule for a join point is effectively a *pattern*, not a piece of code, so there's an argument to be made for allowing a situation like this: diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs index e7e0e7447c..304ed12c2d 100644 --- a/compiler/GHC/Core/Opt/OccurAnal.hs +++ b/compiler/GHC/Core/Opt/OccurAnal.hs @@ -619,7 +619,7 @@ both j's RHS and in its stable unfolding. We want to discover j2 as a join point. So we must do the adjustRhsUsage thing on j's RHS. That's why we pass mb_join_arity to calcUnfolding. -Aame with rules. Suppose we have: +Same with rules. Suppose we have: let j :: Int -> Int j y = 2 * y @@ -631,7 +631,7 @@ Aame with rules. Suppose we have: We identify k as a join point, and we want j to be a join point too. Without the RULE it would be, and we don't want the RULE to mess it up. So provided the join-point arity of k matches the args of the -rule we can allow the tail-cal info from the RHS of the rule to +rule we can allow the tail-call info from the RHS of the rule to propagate. * Wrinkle for Rec case. In the recursive case we don't know the |