[commit: ghc] ghc-7.10: compiler/specialise: shut match_co up a bit (71d1574)

git at git.haskell.org git at git.haskell.org
Mon Jun 1 15:01:45 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/71d1574479a4f413358fd0c0526b722d2d797ea6/ghc

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

commit 71d1574479a4f413358fd0c0526b722d2d797ea6
Author: Austin Seipp <austin at well-typed.com>
Date:   Mon Jun 1 03:45:11 2015 -0500

    compiler/specialise: shut match_co up a bit
    
    This stray pprTrace is quite annoying and makes our build logs a bit
    bigger (hundreds of lines of occurrences), so we should probably just
    get rid of it. Kept under DEBUG for future brave hackers.
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>
    
    Reviewed By: thomie, nomeata
    
    Differential Revision: https://phabricator.haskell.org/D934
    
    (cherry picked from commit f5b43ce177e40a34afb1913bc0ec866185ed95d7)


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

71d1574479a4f413358fd0c0526b722d2d797ea6
 compiler/specialise/Rules.hs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs
index b66d973..2169dc7 100644
--- a/compiler/specialise/Rules.hs
+++ b/compiler/specialise/Rules.hs
@@ -739,9 +739,13 @@ match_co renv subst (TyConAppCo r1 tc1 cos1) co2
          | r1 == r2 && tc1 == tc2
          -> match_cos renv subst cos1 cos2
        _ -> Nothing
-match_co _ _ co1 co2
-  = pprTrace "match_co: needs more cases" (ppr co1 $$ ppr co2) Nothing
+match_co _ _ _co1 _co2
     -- Currently just deals with CoVarCo, TyConAppCo and Refl
+#ifdef DEBUG
+  = pprTrace "match_co: needs more cases" (ppr _co1 $$ ppr _co2) Nothing
+#else
+  = Nothing
+#endif
 
 match_cos :: RuleMatchEnv
          -> RuleSubst



More information about the ghc-commits mailing list