From: simonpj@microsoft.com Date: Thu, 7 Feb 2008 17:16:22 +0000 (+0000) Subject: Adjust error message (Trac #2079) X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=847abda2eae30ef8f07870694765696ec16842a8 Adjust error message (Trac #2079) --- diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index a6a9634..2edfdb0 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -1505,10 +1505,11 @@ check_inst_head dflags clas tys text "where T is not a synonym." $$ text "Use -XTypeSynonymInstances if you want to disable this.") - head_type_args_tyvars_msg = parens ( - text "All instance types must be of the form (T a1 ... an)" $$ - text "where a1 ... an are distinct type *variables*" $$ - text "Use -XFlexibleInstances if you want to disable this.") + head_type_args_tyvars_msg = parens (vcat [ + text "All instance types must be of the form (T a1 ... an)", + text "where a1 ... an are type *variables*,", + text "and each type variable appears at most once in the instance head.", + text "Use -XFlexibleInstances if you want to disable this."]) head_one_type_msg = parens ( text "Only one type can be given in an instance head." $$