This PR rewords the `application type mismatch` error message by more specifically mentioning that the problem is with the final argument. This is useful when the same argument is passed to the function multiple times. We decided against using a wording which specifically mentions the "function expression", because users who are not used to currying might not think of the `f a` in `f a b` as a function.
20 lines
456 B
Text
20 lines
456 B
Text
doIssue.lean:2:2-2:3: error: type mismatch
|
|
x
|
|
has type
|
|
Nat : Type
|
|
but is expected to have type
|
|
IO PUnit : Type
|
|
doIssue.lean:10:2-10:13: error: type mismatch
|
|
xs.set! 0 1
|
|
has type
|
|
Array Nat : Type
|
|
but is expected to have type
|
|
IO PUnit : Type
|
|
doIssue.lean:18:7-18:20: error: Application type mismatch: In the appplication
|
|
pure (xs.set! 0 1)
|
|
the final argument
|
|
xs.set! 0 1
|
|
has type
|
|
Array Nat : Type
|
|
but is expected to have type
|
|
PUnit : Type
|