[commit: ghc] master: In lookupFlatEqn, look in the flat-cache *last* (cd51b9c)

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

On branch  : master

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

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

commit cd51b9ca85c095ea894568b1ca1eb0c8ad4b6f56
Author: Simon Peyton Jones <[email protected]>
Date:   Mon Oct 22 09:10:48 2012 +0100

    In lookupFlatEqn, look in the flat-cache *last*
    
    The other places (solved fun-eqs and inerts) are
    more productive.

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

 compiler/typecheck/TcSMonad.lhs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcSMonad.lhs b/compiler/typecheck/TcSMonad.lhs
index 576df10..78fb0bf 100644
--- a/compiler/typecheck/TcSMonad.lhs
+++ b/compiler/typecheck/TcSMonad.lhs
@@ -876,8 +876,8 @@ lookupFlatEqn fam_ty
             , inert_flat_cache = flat_cache
             , inert_cans = IC { inert_funeqs = inert_funeqs } } <- getTcSInerts
        ; return (lookupFamHead solved_funeqs fam_ty `firstJust` 
-                 lookupFamHead flat_cache fam_ty    `firstJust`
-                 lookup_in_inerts inert_funeqs) }
+                 lookup_in_inerts inert_funeqs    `firstJust`
+                 lookupFamHead flat_cache fam_ty) }
   where
     lookup_in_inerts inert_funeqs 
         = case lookupFamHead inert_funeqs fam_ty of
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.