Mercury Bugs - mercury
View Issue Details
0000498mercuryFeature Requestpublic2020-04-04 21:012020-04-04 21:01
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000498: handle misalignment of arguments in type errors better.
DescriptionSuppose you have a predicate p with arguments A, B, C.
When you add an extra arg at the start of the argument list, say X,
then existing calls p(A, B, C) won't match the new definition p(X, A, B, C),
but they *could* be taken as attempts to curry a call to p.

We currently generate an error message that says 1: arg A should have type X,
2: arg B should have type A, 3: arg C should have type B.

The compiler should notice that each arg i has the type expected of arg i+j,
where j is the number of added arguments, and generate an error message
that reports *this*, instead of generating a message about each argument's
wrong type.
TagsNo tags attached.
Attached Files

There are no notes attached to this issue.

Issue History
2020-04-04 21:01zsNew Issue
2020-04-04 21:01zsStatusnew => assigned
2020-04-04 21:01zsAssigned To => zs