You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: <path>: 2: none of the function bodies unified with actual parameters
foo "string!".
.....^
where it points to the offending token or structure.
I really don't like that error message, only folks who know about our semantics can understand that message. What would be a could general error message to post here? Something like,
Error: <path>: 2: actual argument not recognized.
foo "string!".
.....^
lutz$ asteroid loc.ast
traceback (most recent call last):
loc.ast: 1: calling <toplevel>
loc.ast: 6: calling foo
error: loc.ast: 2: actual argument 'string!' not recognized by function 'foo'
lutz$
which is an improvement.
However, because recognizing an actual argument is pattern matching and therefore computation the error message is pointing into the function code rather than to the call site. Should we fix that?
Consider the program:
Running this would return the error
Error: <path>: 2: none of the function bodies unified with actual parameters
A nicer way of displaying errors would be something like this:
The text was updated successfully, but these errors were encountered: