Module Alg_structs__.Semigroup

Seed

module type Seed = sig ... end

The Seed needed to generate an implementation of Semigroup for the type t.

module type Seed1 = sig ... end

As Seed but for parameteric types of one variable

Interface

module type S = sig ... end

A semigroup is a set of objects with an associative binary operation over it

module type S1 = sig ... end

Laws

module Law : functor (S : S) -> sig ... end

Law notes the laws that should be obeyed by any instantiation of Semigroup in the form of predicates that should be true for any arguments of the appropriate type.

Constructors

Functions and module functors for creating implementations of Semigroups

module Make : functor (S : Seed) -> S with type t = S.t

Make (S) is an implementation of Semigroup generated from the Seed.

val make : ('a -> 'a -> 'a) -> (module S with type t = 'a)

make op is an implementation of Semigroup generated from the operation op.

Implementations

module Bool : sig ... end

Semigroups over bool

module Int : sig ... end

Semigroups over int

module Option : sig ... end

Semigroups over option types

module Endo : sig ... end

Endo is a semigroup where the operator is the composition of functions with input and output of the same type.

module Dual : sig ... end

Dual allows constructing the dual semigroup for a given semigroup. I.e., a semigroup with the arguments of it's operator reversed.