package traits
Module Traits.EqSource
Eq defines primitives for equivalence for type t
In order for a module to implement Eq, it has to conform to the T signature, which implies conformance to PartialEq.T. In fact, Eq builds on top of it and simplity denotes that in addition to symmetricity and transitivity properties, reflexivity property is to be observed (eq a a)
Defines a default implementation of Trait over an existing PartialEq.Trait definition
Source
val eq :
(module T
with type Eq.t = 'a
and type PartialEq.t = 'a
and type PartialEq.rhs = 'a) ->
'a ->
'a ->
boolTests x and y to be equal with a module M that implements signature T
Source
val ne :
(module T with type PartialEq.t = 'a and type PartialEq.rhs = 'a) ->
'a ->
'a ->
boolTests x and y to be unequal with a module M that implements signature T