on master help sign in
Fix "need N more arguments" error message
da3755aspikefoo
src/Reporting/Error/Type.hs+1−1
@@ -774,7 +774,7 @@ reasonToStringHelp reason =
774
774
775 MissingArgs num ->
775 MissingArgs num ->
776 go $
776 go $
777− "It looks like a function needs " <> i2t num <> " more" <> Help.args num <> "."
777+ "It looks like a function needs " <> Help.moreArgs num <> "."
778
778
779 BadVar (Just Comparable) _ ->
779 BadVar (Just Comparable) _ ->
780 go "Only ints, floats, chars, strings, lists, and tuples are comparable."
780 go "Only ints, floats, chars, strings, lists, and tuples are comparable."
src/Reporting/Helpers.hs+6−1
@@ -7,7 +7,7 @@ module Reporting.Helpers
7 , hsep, indent, parens, sep, text, underline, vcat
7 , hsep, indent, parens, sep, text, underline, vcat
8 -- custom helpers
8 -- custom helpers
9 , i2t
9 , i2t
10− , functionName, args
10+ , functionName, args, moreArgs
11 , toHint, hintLink, stack, reflowParagraph
11 , toHint, hintLink, stack, reflowParagraph
12 , commaSep, capitalize, ordinalize, drawCycle
12 , commaSep, capitalize, ordinalize, drawCycle
13 , findPotentialTypos, findTypoPairs, vetTypos
13 , findPotentialTypos, findTypoPairs, vetTypos
@@ -72,6 +72,11 @@ args n =
72 i2t n <> if n == 1 then " argument" else " arguments"
72 i2t n <> if n == 1 then " argument" else " arguments"
73
73
74
74
75+moreArgs :: Int -> Text
76+moreArgs n =
77+ i2t n <> " more" <> if n == 1 then " argument" else " arguments"
78+
79+
75
80
76-- HINTS
81-- HINTS
77
82