Module Meta.Equal

Custom equality key.

The Fun.Generic.equal function consults this key in the metadata of a gist g before determining equality between 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 subtructure by always returning true, the Equal.ignore function does that.

type 'a t = 'a -> 'a -> bool

The type for custom value equality of type 'a.

val ignore : 'a -> 'a -> bool

ignore v0 v1 is true.

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