From 72eec6d6e0f7b0041c38de27a4305af406a3f9ab Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 24 Aug 2001 12:47:04 +0000 Subject: [PATCH] [project @ 2001-08-24 12:47:04 by simonpj] Improve error message for mis-matched contexts --- ghc/compiler/typecheck/TcBinds.lhs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 1.7.10.4