Improve no-type-signature warning
authorIan Lynagh <igloo@earth.li>
Wed, 5 Mar 2008 01:12:42 +0000 (01:12 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 5 Mar 2008 01:12:42 +0000 (01:12 +0000)
Instead of
   Warning: Definition but no type signature for `.+.'
            Inferred type: .+. :: forall a. a
we now say
    Warning: Definition but no type signature for `.+.'
             Inferred type: (.+.) :: forall a. a

compiler/typecheck/TcBinds.lhs

index ea2860a..e3bd657 100644 (file)
@@ -1200,5 +1200,5 @@ missingSigWarn True  name ty
        ; addWarnTcM (env1, mk_msg tidy_ty) }
   where
     mk_msg ty = vcat [ptext SLIT("Definition but no type signature for") <+> quotes (ppr name),
-                     sep [ptext SLIT("Inferred type:") <+> ppr name <+> dcolon <+> ppr ty]]
+                     sep [ptext SLIT("Inferred type:") <+> pprHsVar name <+> dcolon <+> ppr ty]]
 \end{code}