Commit 2fb8e343 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Shorten debug messages

parent bb7db74e
......@@ -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 ()
......
......@@ -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 -----------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment