Package net.hydromatic.morel.util
Class Unifier.Constraint
java.lang.Object
net.hydromatic.morel.util.Unifier.Constraint
- Enclosing class:
Unifier
Constraint arising from a call to an overloaded function.
Consider a call to an overloaded function with two overloads c ->
d and e -> f. If the argument (a) unifies to c
then the result (b) is d; if the argument unifies to
e then the result is f.
This is represented as the following constraint:
{arg: a, result: b, argResults [{c, d}, {e, f}]}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCalled when a constraint is narrowed down to one possibility. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstraint(Unifier.Variable arg, PairList<Unifier.Term, Unifier.Constraint.Action> termActions) Creates a Constraint. -
Method Summary
Modifier and TypeMethodDescriptionstatic Unifier.Constraint.Actionequiv(Unifier.Term term1, Unifier.Term term2) Returns anUnifier.Constraint.Actionthat marks two terms as equivalent.toString()
-
Field Details
-
arg
-
termActions
-
-
Constructor Details
-
Constraint
Constraint(Unifier.Variable arg, PairList<Unifier.Term, Unifier.Constraint.Action> termActions) Creates a Constraint.
-
-
Method Details
-
equiv
Returns anUnifier.Constraint.Actionthat marks two terms as equivalent. -
toString
-