Improve error messages slightly, saying "a1...an" instead of "a b c"
authorsimonpj@microsoft.com <unknown>
Wed, 14 Mar 2007 16:29:06 +0000 (16:29 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 14 Mar 2007 16:29:06 +0000 (16:29 +0000)
compiler/typecheck/TcClassDcl.lhs
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcTyClsDecls.lhs

index f43a4d7..87c1841 100644 (file)
@@ -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) <+> 
index ca5ca0e..12f3a73 100644 (file)
@@ -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.  
index 74e3fb3..4313ad9 100644 (file)
@@ -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