Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : new-demand-to-merge

http://hackage.haskell.org/trac/ghc/changeset/195a1a312abf01420b6956c9293a0d3a40bdfc88

>---------------------------------------------------------------

commit 195a1a312abf01420b6956c9293a0d3a40bdfc88
Author: Ilya Sergey <ilya.ser...@cs.kuleuven.be>
Date:   Wed Nov 7 16:29:12 2012 +0100

    necessary comments added

>---------------------------------------------------------------

 compiler/stranal/WwLib.lhs |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs
index f471410..5874251 100644
--- a/compiler/stranal/WwLib.lhs
+++ b/compiler/stranal/WwLib.lhs
@@ -194,11 +194,21 @@ mkWorkerArgs args all_one_shot res_ty
     | otherwise        
     = (args ++ [newArg], args ++ [realWorldPrimId])
     where
+      -- see Note [All One-Shot Arguments of a Worker]
       newArg = if all_one_shot 
                then setOneShotLambda voidArgId
                else voidArgId     
 \end{code}
 
+Note [All One-Shot Arguments of a Worker]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Sometimes, derived joint-points are just lambda-lifted thunks, whose
+only argument is of the unit type and is never used. This might
+interfere with the absence analysis, basing on which results these
+never-used arguments are eliminated in the worker. The additional
+argument `all_one_shot` of `mkWorkerArgs` is to prevent this.
+
 
 %************************************************************************
 %*                                                                     *



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to