on master help sign in
Make the error message nicer for type arity problems
032e14dEvan Czaplicki
compiler/src/Reporting/Error/Canonicalize.hs+3−3
@@ -188,10 +188,10 @@ toReport source err =
188 Report.toCodeSnippet source region Nothing
188 Report.toCodeSnippet source region Nothing
189 (
189 (
190 H.reflow $
190 H.reflow $
191− "The `" <> N.toString name <> "` " <> thing <> " needs "
191+ "The `" <> N.toString name <> "` " <> thing <> " was given " <> H.args actual <> ":"
192− <> H.args expected <> ", but I only see " <> show actual <> ":"
193 ,
192 ,
194− "What is missing? Is there some typo?"
193+ H.reflow $
194+ "But it needs " <> H.args expected <> ". What is missing? Are some parentheses misplaced?"
195 )
195 )
196
196
197 else
197 else