From: simonpj@microsoft.com Date: Mon, 23 Aug 2010 16:33:08 +0000 (+0000) Subject: Wibbles to error message X-Git-Tag: 2010-11-18~383 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=8163c990823b37ce987429e1f6825358d69171b4 Wibbles to error message --- diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index d5c794b..c7385e2 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -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")