summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Utils.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-01-30 08:45:49 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-01 12:29:26 -0500
commit88fba8a4b3c22e953a634b81dd0b67ec66eb5e72 (patch)
tree75a46332ad32cfeaf4f4d52b3b60fd452f2493b6 /compiler/GHC/Core/Utils.hs
parent06185102bb06d6d56e00d40172a6a473fc228501 (diff)
downloadhaskell-88fba8a4b3c22e953a634b81dd0b67ec66eb5e72.tar.gz
Fix a few Note inconsistencies
Diffstat (limited to 'compiler/GHC/Core/Utils.hs')
-rw-r--r--compiler/GHC/Core/Utils.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index 244f5f4b42..24ab87ac06 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -1218,12 +1218,12 @@ there is only dictionary selection (no construction) involved
Note [exprIsCheap]
~~~~~~~~~~~~~~~~~~
-See also Note [Interaction of exprIsCheap and lone variables] in GHC.Core.Unfold
+See also Note [Interaction of exprIsWorkFree and lone variables] in GHC.Core.Unfold
@exprIsCheap@ looks at a Core expression and returns \tr{True} if
it is obviously in weak head normal form, or is cheap to get to WHNF.
-[Note that that's not the same as exprIsDupable; an expression might be
-big, and hence not dupable, but still cheap.]
+Note that that's not the same as exprIsDupable; an expression might be
+big, and hence not dupable, but still cheap.
By ``cheap'' we mean a computation we're willing to:
push inside a lambda, or
@@ -1951,7 +1951,7 @@ exprIsHNFlike is_con is_con_unf = is_hnf_like
{-
Note [exprIsHNF Tick]
-
+~~~~~~~~~~~~~~~~~~~~~
We can discard source annotations on HNFs as long as they aren't
tick-like:
@@ -2338,7 +2338,9 @@ There are some particularly delicate points here:
The above is correct, but eta-reducing g would yield g=f, the linter will
complain that g and f don't have the same type.
-* Note [Arity care]: we need to be careful if we just look at f's
+* Note [Arity care]
+ ~~~~~~~~~~~~~~~~~
+ We need to be careful if we just look at f's
arity. Currently (Dec07), f's arity is visible in its own RHS (see
Note [Arity robustness] in GHC.Core.Opt.Simplify.Env) so we must *not* trust the
arity when checking that 'f' is a value. Otherwise we will