Wibbles to error message
authorsimonpj@microsoft.com <unknown>
Mon, 23 Aug 2010 16:33:08 +0000 (16:33 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 23 Aug 2010 16:33:08 +0000 (16:33 +0000)
compiler/typecheck/TcMType.lhs

index d5c794b..c7385e2 100644 (file)
@@ -1530,7 +1530,8 @@ dupPredWarn dups   = ptext (sLit "Duplicate constraint(s):") <+> pprWithCommas p
 arityErr :: Outputable a => String -> a -> Int -> Int -> SDoc
 arityErr kind name n m
   = hsep [ text kind, quotes (ppr name), ptext (sLit "should have"),
-          n_arguments <> comma, text "but has been given", int m]
+          n_arguments <> comma, text "but has been given", 
+           if m==0 then text "none" else int m]
     where
        n_arguments | n == 0 = ptext (sLit "no arguments")
                    | n == 1 = ptext (sLit "1 argument")