From: simonpj Date: Thu, 3 May 2001 08:13:39 +0000 (+0000) Subject: [project @ 2001-05-03 08:13:39 by simonpj] X-Git-Tag: Approximately_9120_patches~2026 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=inline;h=8c0814f174aaaacbc242c88f7e51617c5bb220e7;p=ghc-hetmet.git [project @ 2001-05-03 08:13:39 by simonpj] Improve error message --- 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