QGraphSourcetype quality_inconsistency =
(Sorts.QVar.t -> Pp.t) option
* (Sorts.ElimConstraint.kind
* Sorts.Quality.t
* Sorts.Quality.t
* explanation option)type elimination_error = | IllegalConstraintFromSProp of Sorts.Quality.t| IllegalConstantConstraint of Sorts.Quality.constant * Sorts.Quality.constant| CreatesForbiddenPath of Sorts.Quality.t * Sorts.Quality.t| MultipleDominance of Sorts.Quality.t * Sorts.Quality.t * Sorts.Quality.t| QualityInconsistency of quality_inconsistencyAlways call this function on a quality before trying to enforce or check a constraint or calling eliminates_to. Forces Type to eliminate to this quality.
Checks if the given constraint satisfies the dominance condition: Let q1 ~> q2 be the given constraint, with q2 a sort variable. Then q1 (or the dominant sort of q1) should be related to the dominant sort of q2, i.e., dom*(q1) ~> dom(q2) or dom(q2) ~> dom*(q1).
Returns None if the dominance *is not valid*, i.e., if the dominant sorts are not related. Otherwise, returns Some g where g is the updated graph.
Set the first quality to eliminate to the second one in the graph.
If this constraint creates a cycle that violates the constraints, QualityInconsistency is raised.
Graph with the constant quality elimination constraints found in Quality.Constants.eliminates_to.