From: simonpj@microsoft.com Date: Wed, 14 Mar 2007 16:29:06 +0000 (+0000) Subject: Improve error messages slightly, saying "a1...an" instead of "a b c" X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=e07e74e5a074490d25443aeff4db4f1f299040c4;p=ghc-hetmet.git Improve error messages slightly, saying "a1...an" instead of "a b c" --- diff --git a/compiler/typecheck/TcClassDcl.lhs b/compiler/typecheck/TcClassDcl.lhs index f43a4d7..87c1841 100644 --- a/compiler/typecheck/TcClassDcl.lhs +++ b/compiler/typecheck/TcClassDcl.lhs @@ -767,7 +767,7 @@ badGenericInstance sel_id because notSimple inst_tys = vcat [ptext SLIT("because the instance type(s)"), nest 2 (ppr inst_tys), - ptext SLIT("is not a simple type of form (T a b c)")] + ptext SLIT("is not a simple type of form (T a1 ... an)")] notGeneric tycon = vcat [ptext SLIT("because the instance type constructor") <+> quotes (ppr tycon) <+> diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index ca5ca0e..12f3a73 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -1136,8 +1136,8 @@ check_inst_head dflags clas tys where (first_ty : _) = tys - head_shape_msg = parens (text "The instance type must be of form (T a b c)" $$ - text "where T is not a synonym, and a,b,c are distinct type variables") + head_shape_msg = parens (text "The instance type must be of form (T a1 ... an)" $$ + text "where T is not a synonym, and a1 ... an are distinct type variables") -- For now, I only allow tau-types (not polytypes) in -- the head of an instance decl. diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index 74e3fb3..4313ad9 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -1146,7 +1146,7 @@ newtypeExError con nest 2 $ ptext SLIT("but") <+> quotes (ppr con) <+> ptext SLIT("does")] newtypePredError con - = sep [ptext SLIT("A newtype constructor must have a return type of form T a b c"), + = sep [ptext SLIT("A newtype constructor must have a return type of form T a1 ... an"), nest 2 $ ptext SLIT("but") <+> quotes (ppr con) <+> ptext SLIT("does not")] newtypeFieldErr con_name n_flds