package alg_structs_qcheck

  1. Overview
  2. Docs

The Alg.Semigroup.S interface extended with a way of generating arbitrary QCheck values.

include Alg.Semigroup.S
include Alg_structs.Semigroup.Seed
type t

The principle (and sole) type.

We can think of this set-theoretically as the carrier set of the algebraic structure or category-theoretically as the single object in the category, with each element being a morphism t -> t.

val op : t -> t -> t

op x y is an associative operation over all elements x and y of type t. Category-theoretically, this is the composition of morphisms.

val (*) : t -> t -> t

The infix version of op.

concat xs is the concatenation of all elements of xs into a single value using op.

This is equivalent to List.fold_right op (NonEmptyList.tl xs) (NonEmptyList.hd xs).

val name : string
val arbitrary : t QCheck.arbitrary