Shorten debug messages
authorsimonpj@microsoft.com <unknown>
Tue, 3 Jun 2008 12:12:08 +0000 (12:12 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 3 Jun 2008 12:12:08 +0000 (12:12 +0000)
compiler/coreSyn/CoreLint.lhs
compiler/simplCore/SimplUtils.lhs

index de9830b..7a5fac4 100644 (file)
@@ -370,7 +370,8 @@ lintCoreExpr e@(Case scrut var alt_ty alts) =
               | debugIsOn &&
                 isAlgTyCon tycon && 
                 null (tyConDataCons tycon) -> 
-                  pprTrace "case binder's type has no constructors" (ppr e)
+                  pprTrace "Lint warning: case binder's type has no constructors" (ppr var <+> ppr (idType var))
+                       -- This can legitimately happen for type families
                       $ return ()
          _otherwise -> return ()
 
index d7353dd..84506d8 100644 (file)
@@ -1426,7 +1426,8 @@ prepareDefault _ _ case_bndr (Just (tycon, inst_tys)) imposs_cons (Just deflt_rh
        _ -> return [(DEFAULT, [], deflt_rhs)]
 
   | debugIsOn, isAlgTyCon tycon, [] <- tyConDataCons tycon
-  = pprTrace "prepareDefault" (ppr case_bndr <+> ppr tycon <+> ppr deflt_rhs)
+  = pprTrace "prepareDefault" (ppr case_bndr <+> ppr tycon)
+       -- This can legitimately happen for type families
         $ return [(DEFAULT, [], deflt_rhs)]
 
 --------- Catch-all cases -----------