Module Generic.Compare

Custom comparison key.

The Fun.Generic.compare function consults this key in the metadata of a gist g before comparing values described by the gist. If a function is found, the values are compared with this function instead.

This can also be used to indicate that you would not like to compare a substructure by always returning 0 (equal), the Compare.ignore function does that.

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

ignore v0 v1 is 0.