Module Meta.Compare

Custom comparison key.

The 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.

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

The type for custom value equality of type 'a.

val ignore : 'a -> 'a -> int

ignore v0 v1 is 0.

type 'a meta := 'a Type.Gist.Meta.t
val mem : 'a meta -> bool

mem m is true iff m has a binding for the key.

val add : 'a t -> 'a meta -> 'a meta

add v m is m with the key bound to v

val find : 'a meta -> 'a t option

find m is the binding for the key (if any).

val remove : 'a meta -> 'a meta

remove m is m with the binding for the key removed (if bound).