package frenetic

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include HashCmp
type t
val equal : t -> t -> Ppx_deriving_runtime.bool
include Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val compare : t -> t -> int
val hash_fold_t : Ppx_hash_lib.Std.Hash.state -> t -> Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val to_string : t -> string
val sum : t -> t -> t

An associative and commutative binary operation over the type t. The following should hold:

  • sum a (sum b c) = sum (sum a b) c.
  • sum a b = sum b a.
val prod : t -> t -> t

An associative binary operation over the type t. The following should hold:

  • prod a (prod b c) = prod (prod a b) c.
  • prod a (sum b c) = sum (prod a b) (prod a c).
val one : t

The identity for the prod operation. The following should hold:

  • prod one t = t.
  • prod t one = t.

As an example, if t where the type bool and prod and sum were && and ||, respectively, then one should be the value true.

val zero : t

The identity for the sum operation. The following should hold:

  • sum zero t = t.
  • sum t zero = t.
  • prod zero t = zero.
  • prod t zero = zero.

As an example, if t where the type bool and prod and sum were && and ||, respectively, then zero should be the value false.

OCaml

Innovation. Community. Security.