Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch :
http://hackage.haskell.org/trac/ghc/changeset/a4c1c7b22b5523f2e38d02400ed155abdf2dedef >--------------------------------------------------------------- commit a4c1c7b22b5523f2e38d02400ed155abdf2dedef Author: Max Bolingbroke <batterseapo...@hotmail.com> Date: Fri Apr 27 11:32:12 2012 +0100 Comments only >--------------------------------------------------------------- compiler/supercompile/Supercompile/Drive/MSG.hs | 4 +++- .../supercompile/Supercompile/Drive/Process3.hs | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/supercompile/Supercompile/Drive/MSG.hs b/compiler/supercompile/Supercompile/Drive/MSG.hs index 2e6fb5c..08fde0a 100644 --- a/compiler/supercompile/Supercompile/Drive/MSG.hs +++ b/compiler/supercompile/Supercompile/Drive/MSG.hs @@ -62,7 +62,9 @@ rnBndr2' rn2 x_l x_r = MSG $ \_ s -> Right (s, rnBndr2'' (uniqAway (msgInScopeSe -- BUT I don't want to just put ids_l/ids_r in the RnEnv2 because that will force common occurrence sites to rename (in msgPend) which -- which will make things drastically worse! Instead, rnBndr2' does the uniqAway manually.) --- FIXME: rigid variable occurrences do not get correct type/info +-- FIXME: rigid variable occurrences do not get correct type/info. +-- This probably dosent' matter for internal binders since the supercompiler's normal renaming mechanism +-- will propagate binding-site info down to the use sites, but it matters a TON for the stack binders! rnBndr2'' :: (Var -> Var) -> RnEnv2 -> Var -> Var -> (RnEnv2, Var) rnBndr2'' f rn2 x_l x_r = (rn2', x') diff --git a/compiler/supercompile/Supercompile/Drive/Process3.hs b/compiler/supercompile/Supercompile/Drive/Process3.hs index 3ee8967..dc8a3a9 100644 --- a/compiler/supercompile/Supercompile/Drive/Process3.hs +++ b/compiler/supercompile/Supercompile/Drive/Process3.hs @@ -485,13 +485,13 @@ data MemoHow = Skip | CheckOnly | CheckAndRemember -- If you do then you can start with this term: -- [1] let $dNum = ww3 in * a $dNum -- --- Looks like this after reduction+GC: +-- Looks like this after reduction+GC (the update for $dNum is dead): -- [2] case ww3 of Num ... -- --- And if we reduce+split [1] instead we get: +-- And if we reduce+split [1] instead we get (the update for $dNum is residualised): -- [3] case $dNum of Num ... -- --- Reducing+GCing [3] term gives us [3] again, and that is alpha equivalent to [2], +-- Reducing+GCing [3] gives us [3] again, and that is alpha equivalent to [2], -- so we tie back to it rather than continuing. But that means our code is: -- let h @a ww3 = let $dNum = ww3 -- in h a $dNum _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc