Improve error messages by highlighting unmatched argument

Description

I'm currently trying to fix a couple of type errors with the following form, and it's very difficult to find which argument is not matching the type signature.

From inspection I can see that the second and third parameters seem OK, since they are have expanded to the same string, but core.typed does not tell me if the problem is with the first, fourth, or both arguments.

Environment

None

Activity

Show:
Marc O'Morain
June 22, 2015, 11:10 PM

I submitted to soon and I don't seem to have edit permission – I was going to suggest that the error message include the argument index of the failing type-check, and print the expected and given types as an extra message. It would be even better if you could pull out the parameter name given when the function is defined:

Ambrose Bonnaire-Sergeant
December 3, 2017, 10:33 PM

Not planning to improve myself, patches welcome.

Assignee

Ambrose Bonnaire-Sergeant

Reporter

Marc O'Morain

Approval

None

Patch

None

Priority

Minor
Configure