mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 20:03:44 +00:00
compiler/unify_proc.m:
When creating goals of the form
X = f(ArgX1, ArgX2),
Y = f(ArgY1, ArgY2),
...
don't traverse (a) the types of the arguments of f, (b) the ArgXi, and
(c) the ArgYi separately, living with the possibility that the lists
containing them have different lengths. Instead, create a list of triples,
and traverse that.
Give names such as ArgX1 to these variables. (They used to be unnamed.)
Reorder things to ensure that the order of predicate/function declarations
is matched by the order of their definitions.
tests/invalid/partial_implied_mode.err_exp:
Expect ArgX2 to be a named variable in an error message.
28 lines
1.6 KiB
Plaintext
28 lines
1.6 KiB
Plaintext
partial_implied_mode.m:039: In clause for
|
|
partial_implied_mode.m:039: `'__Unify__'((unique(partial_implied_mode2.physic_quantity(ground,
|
|
partial_implied_mode.m:039: free, unique(partial_implied_mode2.absol(free,
|
|
partial_implied_mode.m:039: free)))) >>
|
|
partial_implied_mode.m:039: bound(partial_implied_mode2.physic_quantity(ground,
|
|
partial_implied_mode.m:039: ground, bound(partial_implied_mode2.absol(ground,
|
|
partial_implied_mode.m:039: ground))))), (ground >>
|
|
partial_implied_mode.m:039: bound(partial_implied_mode2.physic_quantity(ground,
|
|
partial_implied_mode.m:039: ground, bound(partial_implied_mode2.absol(ground,
|
|
partial_implied_mode.m:039: ground))))))':
|
|
partial_implied_mode.m:039: mode error in unification of `HeadVar__1' and
|
|
partial_implied_mode.m:039: `partial_implied_mode2.physic_quantity(V_13,
|
|
partial_implied_mode.m:039: ArgX2, V_14)'.
|
|
partial_implied_mode.m:039: Variable `HeadVar__1' has instantiatedness
|
|
partial_implied_mode.m:039: unique(
|
|
partial_implied_mode.m:039: physic_quantity(
|
|
partial_implied_mode.m:039: ground,
|
|
partial_implied_mode.m:039: free,
|
|
partial_implied_mode.m:039: unique(
|
|
partial_implied_mode.m:039: absol(free, free)
|
|
partial_implied_mode.m:039: )
|
|
partial_implied_mode.m:039: )
|
|
partial_implied_mode.m:039: ),
|
|
partial_implied_mode.m:039: term `partial_implied_mode2.physic_quantity(V_13,
|
|
partial_implied_mode.m:039: ArgX2, V_14)' has instantiatedness
|
|
partial_implied_mode.m:039: named inst
|
|
partial_implied_mode.m:039: partial_implied_mode2.physic_quantity(free, ground, free).
|