[m-rev.] diff: improve wrong arity error messages

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Jun 22 21:29:15 AEST 2016


When using a function symbol with the wrong arity, print the
possible right arities for functions, as well as data constructors,
of the same name.

In theory if you call e.g. f/5, but f has arity 4, then uses of
f with arity 0, 1, 2 and 3 can also be legal, as partial applications
of f/4. Should the error message mention this fact? Most of the time,
people apply functions fully, not partially.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.waf
Type: application/octet-stream
Size: 880 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20160622/3196805d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.waf
Type: application/octet-stream
Size: 8121 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20160622/3196805d/attachment-0001.obj>


More information about the reviews mailing list