From f857ebdc976f064ad5b17417d9bb0596828008af Mon Sep 17 00:00:00 2001 From: simonpj Date: Sat, 16 Apr 2005 22:46:01 +0000 Subject: [PATCH] [project @ 2005-04-16 22:46:01 by simonpj] Improve kind error msg; may make some tests change their output --- ghc/compiler/typecheck/TcUnify.lhs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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} -- 1.7.10.4