on master help sign in
Say the operator name in RHS type errors
704f726Evan Czaplicki
src/Reporting/Error/Type.hs+4−3
@@ -10,6 +10,7 @@ import Text.PrettyPrint.ANSI.Leijen
10 , fillSep, indent, text, underline, vcat
10 , fillSep, indent, text, underline, vcat
11 )
11 )
12
12
13+import qualified AST.Helpers as Help
13import qualified AST.Type as Type
14import qualified AST.Type as Type
14import qualified AST.Variable as Var
15import qualified AST.Variable as Var
15import qualified Reporting.Error.Helpers as Help
16import qualified Reporting.Error.Helpers as Help
@@ -274,9 +275,9 @@ mismatchToReport localizer (MismatchInfo hint leftType rightType maybeReason) =
274 "But the right side is:"
275 "But the right side is:"
275 ( binopHint op leftType rightType
276 ( binopHint op leftType rightType
276 ++
277 ++
277− [ "With binary operations, I always figure out the left side first. If it\
278+ [ "With operators like " ++ prettyName op ++ " I always check the left\
278− \ seems fine, I assume it is \"correct\" in subsequent checks.\
279+ \ side first. If it seems fine, I assume it is correct and check the right\
279− \ So the problem may actually be in how the left and right arguments interact."
280+ \ side. So the problem may be in how the left and right arguments interact."
280 ]
281 ]
281 )
282 )
282 )
283 )