From: simonpj Date: Sat, 16 Apr 2005 22:46:01 +0000 (+0000) Subject: [project @ 2005-04-16 22:46:01 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~727 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f857ebdc976f064ad5b17417d9bb0596828008af;p=ghc-hetmet.git [project @ 2005-04-16 22:46:01 by simonpj] Improve kind error msg; may make some tests change their output --- diff --git a/ghc/compiler/typecheck/TcUnify.lhs b/ghc/compiler/typecheck/TcUnify.lhs index b080809..ec5c9a4 100644 --- a/ghc/compiler/typecheck/TcUnify.lhs +++ b/ghc/compiler/typecheck/TcUnify.lhs @@ -1266,11 +1266,14 @@ checkExpectedKind ty act_kind exp_kind <+> ptext SLIT("is lifted") | otherwise -- E.g. Monad [Int] - = sep [ ptext SLIT("Expecting kind") <+> quotes (pprKind exp_kind) <> comma, - ptext SLIT("but") <+> quotes (ppr ty) <+> - ptext SLIT("has kind") <+> quotes (pprKind act_kind)] + = ptext SLIT("Kind mis-match") + + more_info = sep [ ptext SLIT("Expected kind") <+> + quotes (pprKind exp_kind) <> comma, + ptext SLIT("but") <+> quotes (ppr ty) <+> + ptext SLIT("has kind") <+> quotes (pprKind act_kind)] in - failWithTc (ptext SLIT("Kind error:") <+> err) + failWithTc (err $$ more_info) } \end{code}