From 89ba46554025f413959be53b2868ba1a79f12ae2 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Thu, 7 Jul 2022 11:42:21 +0100 Subject: Tiny documentation wibbles (comments only) --- compiler/GHC/Core/Opt/Arity.hs | 4 ++-- compiler/GHC/Core/Opt/DmdAnal.hs | 4 ++-- compiler/GHC/Core/Opt/WorkWrap/Utils.hs | 2 +- 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 , 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 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. -- cgit v1.2.1