Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : supercompiler
http://hackage.haskell.org/trac/ghc/changeset/77f89c7a7d82541efd5da9754066a38269dcad8b >--------------------------------------------------------------- commit 77f89c7a7d82541efd5da9754066a38269dcad8b Author: Max Bolingbroke <batterseapo...@hotmail.com> Date: Thu Oct 20 10:04:04 2011 +0100 Small tweaks, still doesn't work >--------------------------------------------------------------- compiler/supercompile/Supercompile.hs | 2 +- compiler/supercompile/Supercompile/Drive/Match.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/supercompile/Supercompile.hs b/compiler/supercompile/Supercompile.hs index 60340a9..02c371c 100644 --- a/compiler/supercompile/Supercompile.hs +++ b/compiler/supercompile/Supercompile.hs @@ -218,7 +218,7 @@ termToCoreExpr = term -- NB: assumes no-shadowing at the top level. I don't want to have to rename stuff to -- commute CoreBinds... partitionBinds :: (Id -> Bool) -> [CoreBind] -> ([CoreBind], [CoreBind], S.FreeVars) -partitionBinds should_sc initial_binds = go initial_inside [(b, unionVarSets (map exprFreeVars (rhssOfBind b))) | b <- initial_undecided] +partitionBinds should_sc initial_binds = go initial_inside [(b, unionVarSets (map S.idFreeVars (bindersOf b) ++ map exprFreeVars (rhssOfBind b))) | b <- initial_undecided] where (initial_inside, initial_undecided) = partition (any should_sc . bindersOf) initial_binds diff --git a/compiler/supercompile/Supercompile/Drive/Match.hs b/compiler/supercompile/Supercompile/Drive/Match.hs index 2cb4ec9..9429344 100644 --- a/compiler/supercompile/Supercompile/Drive/Match.hs +++ b/compiler/supercompile/Supercompile/Drive/Match.hs @@ -406,7 +406,7 @@ matchPureHeap rn2 init_free_eqs h_l h_r where go extra_free_eqs used_l' used_r' = do -- Don't forget to match types/unfoldings of binders as well: bndr_free_eqs <- matchBndrExtras rn2 x_l x_r - matchLoop ((x_l, x_r) : bndr_free_eqs ++ known) (extra_free_eqs ++ free_eqs) used_l' used_r' + matchLoop ((x_l, x_r) : known) (bndr_free_eqs ++ extra_free_eqs ++ free_eqs) used_l' used_r' app3 :: [a] -> [a] -> [a] -> [a] app3 x y z = x ++ y ++ z _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc