Module Generic.Compare

Custom compare function metadata key.

If a gist or field defines a value for this key, the Fun.Generic.compare function uses it for comparing the values.

Using a function that always returns 0 like Compare.ignore can also be used to indicate that a value or field should not influence the comparison.

type 'a t = 'a -> 'a -> int

The type for custom compare functions.

val ignore : 'a t

ignore v0 v1 is 0.

val mem : ('a, 'b) Type.Gist.Meta.t2 -> bool
val add : 'b t -> ('a, 'b) Type.Gist.Meta.t2 -> ('a, 'b) Type.Gist.Meta.t2
val find : ('a, 'b) Type.Gist.Meta.t2 -> 'b t option
val remove : ('a, 'b) Type.Gist.Meta.t2 -> ('a, 'b) Type.Gist.Meta.t2