Add hints for right binop problems
Provide a little hint about how the left and right sides of a binop can
mess with each other, so seeing something on the right may actually
indicate that the left is wrong.
commit84fcd5bec4d37a3a89f72cd905e8abc15ae6699e
authorEvan Czaplicki <info@elm-lang.org>
dateThu 22 Oct 2015, 16:39 (11 years ago)
parent3d9e219
src/Reporting/Error/Type.hs+4−1
@@ -244,7 +244,10 @@ mismatchToReport localizer (MismatchInfo hint leftType rightType maybeReason) =
244244 ( cmpHint
245245 (prettyName op ++ " is expecting the right argument to be a:")
246246 "But the right argument is:"
247− []
247+ [ "I always figure out the type of the left argument first and if it is\
248+ \ acceptable on its own, I assume it is \"correct\" in subsequent checks.\
249+ \ So the problem may actually be in how the left and right arguments interact."
250+ ]
248251 )
249252
250253 Binop op ->