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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 Type Error (circle/backend/action/bash.clj:315:32) Function bash could not be applied to arguments: Domains: circle.util.type.ann/BuildRef t/Any (t/U sh/SteveExpr sh/SteveOneLiner) (t/HMap :optional {:background Boolean}) Arguments: (Ref circle.util.type.ann/BuildNode circle.util.type.ann/BuildNode) t/Any (t/U sh/SteveExpr sh/SteveOneLiner) (t/HMap :mandatory {:bash-command String, :name t/Any} :optional {:environment sh/EnvMap, :pwd String, :circle-bug-on-fail Boolean}) Ranges: t/Any with expected type: t/Any

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

Status

Assignee

Ambrose BS

Reporter

Marc O'Morain

Approval

None

Patch

None

Priority

Minor
Configure