package base
Source file equal.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44(** This module defines signatures that are to be included in other signatures to ensure a consistent interface to [equal] functions. There is a signature ([S], [S1], [S2], [S3]) for each arity of type. Usage looks like: {[ type t include Equal.S with type t := t ]} or {[ type 'a t include Equal.S1 with type 'a t := 'a t ]} *) open! Import type 'a t = 'a -> 'a -> bool type 'a equal = 'a t module type S = sig type t val equal : t equal end module type S1 = sig type 'a t val equal : 'a equal -> 'a t equal end module type S2 = sig type ('a, 'b) t val equal : 'a equal -> 'b equal -> ('a, 'b) t equal end module type S3 = sig type ('a, 'b, 'c) t val equal : 'a equal -> 'b equal -> 'c equal -> ('a, 'b, 'c) t equal end