From 847abda2eae30ef8f07870694765696ec16842a8 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Thu, 7 Feb 2008 17:16:22 +0000 Subject: [PATCH] Adjust error message (Trac #2079) --- compiler/typecheck/TcMType.lhs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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." $$ -- 1.7.10.4