Commit 8163c990 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Wibbles to error message

parent eabf04b7
...@@ -1530,7 +1530,8 @@ dupPredWarn dups = ptext (sLit "Duplicate constraint(s):") <+> pprWithCommas p ...@@ -1530,7 +1530,8 @@ dupPredWarn dups = ptext (sLit "Duplicate constraint(s):") <+> pprWithCommas p
arityErr :: Outputable a => String -> a -> Int -> Int -> SDoc arityErr :: Outputable a => String -> a -> Int -> Int -> SDoc
arityErr kind name n m arityErr kind name n m
= hsep [ text kind, quotes (ppr name), ptext (sLit "should have"), = 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 where
n_arguments | n == 0 = ptext (sLit "no arguments") n_arguments | n == 0 = ptext (sLit "no arguments")
| n == 1 = ptext (sLit "1 argument") | n == 1 = ptext (sLit "1 argument")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment