Module Precedence.Constr
Constraints
type 'a t
= private ID.t -> ID.t -> int
constraint 'a = [< `partial | `total ]
A partial order on symbols, used to make the precedence more precise.
'a
encodes the kind of ordering: partial or total NOTE: the ordering must partition the set of ALL symbols into equivalence classes, within which all symbols are equal, but symbols of distinct equivalence classes are always ordered.
val arity : (ID.t -> int) -> [ `partial ] t
decreasing arity constraint (big arity => high in precedence)
val invfreq : ID.t Sequence.t -> [ `partial ] t
symbols with high frequency are smaller. Elements of unknown frequency are assumed to have a frequency of 0.
val alpha : [ `total ] t
alphabetic ordering on symbols, themselves bigger than builtin
val compose : [ `partial ] t -> [< `partial | `total ] as a t -> 'a t
compose a b
usesa
to compare symbols; ifa
cannot decide, then we useb
.