[commit: ghc] supercompiler: Comment only (fa5cfc0)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : supercompiler

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

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

commit fa5cfc059be1376b91b39253e606c7973cc821e9
Author: Max Bolingbroke <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.