package containers

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module CCEqualSource

Equality Combinators

  • since 1.2
Sourcetype 'a t = 'a -> 'a -> bool

Equality function. Must be transitive, symmetric, and reflexive.

Sourceval poly : 'a t

Standard polymorphic equality.

Sourceval physical : 'a t

Standard physical equality.

  • since 2.0
Sourceval int : int t
Sourceval string : string t
Sourceval bool : bool t
Sourceval float : float t
Sourceval unit : unit t
Sourceval list : 'a t -> 'a list t
Sourceval array : 'a t -> 'a array t
Sourceval option : 'a t -> 'a option t
Sourceval pair : 'a t -> 'b t -> ('a * 'b) t
Sourceval triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
Sourceval map : ('a -> 'b) -> 'b t -> 'a t

map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.

Sourceval always_eq : _ t

Always returns true. All values are equal.

  • since 3.0
Sourceval never_eq : _ t

Always returns false. No values are, so this is not even reflexive (i.e. x=x is false). Be careful!

  • since 3.0
Sourcemodule Infix : sig ... end
include module type of Infix
Sourceval (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

OCaml

Innovation. Community. Security.