summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2022-07-07 11:42:21 +0100
committerZubin <zubin.duggal@gmail.com>2022-07-12 13:26:52 +0000
commit89ba46554025f413959be53b2868ba1a79f12ae2 (patch)
treec85974ee749f9d53eb6aa99cc2aff73ccd02e136
parent6e8d90560b4a9269c56f7c1ee4d29d1077680f7b (diff)
downloadhaskell-wip/T21452.tar.gz
Tiny documentation wibbles (comments only)wip/T21452
-rw-r--r--compiler/GHC/Core/Opt/Arity.hs4
-rw-r--r--compiler/GHC/Core/Opt/DmdAnal.hs4
-rw-r--r--compiler/GHC/Core/Opt/WorkWrap/Utils.hs2
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Core/Opt/Arity.hs b/compiler/GHC/Core/Opt/Arity.hs
index 84af26e257..8a0a69ca97 100644
--- a/compiler/GHC/Core/Opt/Arity.hs
+++ b/compiler/GHC/Core/Opt/Arity.hs
@@ -2156,7 +2156,7 @@ eta-reduce that are specific to Core and GHC:
See Note [Eta expanding primops].
W. We may not undersaturate StrictWorkerIds.
- See Note [CBV Function Ids] in GHC.CoreToStg.Prep.
+ See Note [CBV Function Ids] in GHC.Types.Id.Info.
Here is a list of historic accidents surrounding unsound eta-reduction:
@@ -2474,7 +2474,7 @@ canEtaReduceToArity fun dest_join_arity dest_arity =
|| ( dest_arity < idCbvMarkArity fun ) -- (W)
-- Don't undersaturate StrictWorkerIds.
- -- See Note [CBV Function Ids] in GHC.CoreToStg.Prep.
+ -- See Note [CBV Function Ids] in GHC.Types.Id.Info.
|| isLinearType (idType fun) -- (L)
-- Don't perform eta reduction on linear types.
diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs
index d41b97ac87..c7278fa079 100644
--- a/compiler/GHC/Core/Opt/DmdAnal.hs
+++ b/compiler/GHC/Core/Opt/DmdAnal.hs
@@ -1186,7 +1186,7 @@ For example, if f's demand signature is <L><L>, f's arity could be
greater than, or less than 2. Why? Because both are conservative
approximations:
-* Arity n means "does no work until applied to at least n args"
+* Arity n means "does no expensive work until applied to at least n args"
(e.g. (f x1..xm) is cheap to bring to HNF for m<n)
* Dmd sig with n args means "here is how to transform the incoming demand
@@ -1197,7 +1197,7 @@ We used to check in GHC.Core.Lint that dmdTypeDepth <= idArity for a let-bound
identifier. But that means we would have to zap demand signatures every time we
reset or decrease arity.
-For example, consider the following expression, for example:
+For example, consider the following expression:
(let go x y = `x` seq ... in go) |> co
diff --git a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
index 79074a3e05..1f5cd29a26 100644
--- a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
+++ b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
@@ -1110,7 +1110,7 @@ Needless to say, there are some wrinkles:
NB from Andreas: But I think using an error thunk there would be dodgy no matter what
for example if we decide to pass the argument to the bottoming function cbv.
As we might do if the function in question is a worker.
- See Note [CBV Function Ids] in GHC.CoreToStg.Prep. So I just left the strictness check
+ See Note [CBV Function Ids] in GHC.Types.Id.Info. So I just left the strictness check
in place on top of threading through the marks from the constructor. It's a *really* cheap
and easy check to make anyway.