package traits

  1. Overview
  2. Docs

Module Traits.PartialEqSource

PartialEq defines primitives for partial equivalence for two types (t and rhs)

In order for a module to implement PartialEq, it has to conform to the T signature.

Sourcemodule type Trait = sig ... end

PartialEq implementation signature

Sourcemodule type T = sig ... end

Signature that defines PartialEq conformity

Sourcemodule Make (T : sig ... end) : sig ... end

Defines a default implementation of Trait.ne over an existing Trait.eq definition

Sourceval eq : (module T with type PartialEq.rhs = 'b and type PartialEq.t = 'a) -> 'a -> 'b -> bool

Tests x and y to be equal with a module M that implements signature T

Sourceval ne : (module T with type PartialEq.rhs = 'b and type PartialEq.t = 'a) -> 'a -> 'b -> bool

Tests x and y to be unequal with a module M that implements signature T

OCaml

Innovation. Community. Security.