From: simonpj Date: Fri, 24 Aug 2001 12:47:04 +0000 (+0000) Subject: [project @ 2001-08-24 12:47:04 by simonpj] X-Git-Tag: Approximately_9120_patches~1080 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=72eec6d6e0f7b0041c38de27a4305af406a3f9ab;p=ghc-hetmet.git [project @ 2001-08-24 12:47:04 by simonpj] Improve error message for mis-matched contexts --- diff --git a/ghc/compiler/typecheck/TcBinds.lhs b/ghc/compiler/typecheck/TcBinds.lhs index 4a1203a..9ace4e4 100644 --- a/ghc/compiler/typecheck/TcBinds.lhs +++ b/ghc/compiler/typecheck/TcBinds.lhs @@ -780,9 +780,10 @@ valSpecSigCtxt v ty sigContextsErr = ptext SLIT("Mismatched contexts") sigContextsCtxt s1 s2 - = hang (hsep [ptext SLIT("When matching the contexts of the signatures for"), - quotes (ppr s1), ptext SLIT("and"), quotes (ppr s2)]) - 4 (ptext SLIT("(the signature contexts in a mutually recursive group should all be identical)")) + = vcat [ptext SLIT("When matching the contexts of the signatures for"), + nest 2 (vcat [ppr s1 <+> dcolon <+> ppr (idType s1), + ppr s2 <+> dcolon <+> ppr (idType s2)]), + ptext SLIT("The signature contexts in a mutually recursive group should all be identical")] ----------------------------------------------- unliftedBindErr flavour mbind