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

On branch  : supercompiler

http://hackage.haskell.org/trac/ghc/changeset/fa5cfc059be1376b91b39253e606c7973cc821e9

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

commit fa5cfc059be1376b91b39253e606c7973cc821e9
Author: Max Bolingbroke <batterseapo...@hotmail.com>
Date:   Thu Jan 5 09:26:45 2012 +0000

    Comment only

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

 compiler/supercompile/Supercompile/Drive/Match.hs |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Drive/Match.hs 
b/compiler/supercompile/Supercompile/Drive/Match.hs
index 4ad4317..a28a27b 100644
--- a/compiler/supercompile/Supercompile/Drive/Match.hs
+++ b/compiler/supercompile/Supercompile/Drive/Match.hs
@@ -393,6 +393,11 @@ matchECFrame init_rn2 rn2 kf_l kf_r = go (tagee kf_l) 
(tagee kf_r)
 --      a |-> True; ()<(a, a)> `match` c |-> True; d |-> True; ()<(c, d)>
 --      a |-> True; ()<(a, a)> `match` c |-> True; d |-> c; ()<(c, d)>
 -- However, I'm going to reject this for now (simpler).
+--
+-- TODO: arguably I should check that this is actually a true *bijection* not 
just a *function* because a renaming like
+-- {x |-> a, y |-> a} means that if we carrried on supercompiling here we 
could exploit more equalities (via positive information
+-- propagation - imagine we scrutinise x and later scrutinise y) and 
potentially get better code that at the tieback site. I need to
+-- check how important this is in practice.
 safeMkMatchResult :: [(Var, Var)] -> Match MatchResult
 safeMkMatchResult eqs = guard "safeMkRenaming" (all (\(x_l, x_r) -> M.lookup 
x_l eqs_map == Just x_r) eqs) >> return eqs_map
   where eqs_map = M.fromList eqs



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

Reply via email to