Shift.Opposite
Opposite displacements
module Base : S
include S
include StructuredType.PartiallyOrderedType
include StructuredType.EqualityType
type t
The type.
val equal : t -> t -> bool
equal x y checks whether x and y are equivalent.
equal x y
x
y
val dump : Stdlib.Format.formatter -> t -> unit
Ugly printer.
val lt : t -> t -> bool
lt x y checks if x is strictly less than y. Note that trichotomy fails for general partial orders.
lt x y
val leq : t -> t -> bool
leq x y checks if x is less than or equal to y. Note that trichotomy fails for general partial orders.
leq x y
val id : t
id is the unit.
id
val is_id : t -> bool
is_id s checks whether s is the unit. It is equivalent to equal id s, but potentially faster.
is_id s
s
equal id s
val compose : t -> t -> t
compose s1 s2 composes the operators s1 and s2. Note that Foo^s1^s2 in McBride's notation is understood as compose (compose ... s2) s1 with the reversed order.
compose s1 s2
s1
s2
Foo^s1^s2
compose (compose ... s2) s1
val of_base : Base.t -> t
of_base b gives the same level b in the opposite algebra.
of_base b
b
val to_base : t -> Base.t
to_base b gives the same level b in the original algebra.
to_base b