From 8c0814f174aaaacbc242c88f7e51617c5bb220e7 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 3 May 2001 08:13:39 +0000 Subject: [PATCH] [project @ 2001-05-03 08:13:39 by simonpj] Improve error message --- ghc/compiler/typecheck/TcMonoType.lhs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/typecheck/TcMonoType.lhs b/ghc/compiler/typecheck/TcMonoType.lhs index ddd4f76..0e622a0 100644 --- a/ghc/compiler/typecheck/TcMonoType.lhs +++ b/ghc/compiler/typecheck/TcMonoType.lhs @@ -983,9 +983,10 @@ ambigErr pred ppr_ty ptext SLIT("must be reachable from the type after the =>"))] freeErr pred ppr_ty - = sep [ptext SLIT("The constraint") <+> quotes (pprPred pred) <+> - ptext SLIT("does not mention any of the universally quantified type variables"), - nest 4 (ptext SLIT("in the type") <+> quotes ppr_ty) + = sep [ptext SLIT("All of the type variables in the constraint") <+> quotes (pprPred pred) <+> + ptext SLIT("are already in scope"), + nest 4 (ptext SLIT("At least one must be universally quantified here")), + ptext SLIT("In the type") <+> quotes ppr_ty ] polyArgTyErr ty = ptext SLIT("Illegal polymorphic type as argument:") <+> ppr ty -- 1.7.10.4