Module Preface_laws

The abstractions described in Preface generally impose laws (or behaviour) that must be respected to ensure that the derived combinators have the expected behaviour. This library allows the generation of structured laws (Law) for a concrete representation of an abstraction. They are notably used in tests.

Each module that produces laws prefixes the name of the law with the abstraction to avoid collisions between certain names. For example Applicative also embeds the laws of Functors.

Monoid hierarchy

module Semigroup : sig ... end
module Monoid : sig ... end

Lattice hierarchy

module Meet_semilattice : sig ... end
module Join_semilattice : sig ... end
module Bounded_meet_semilattice : sig ... end
module Bounded_join_semilattice : sig ... end
module Bounded_lattice : sig ... end
module Lattice : sig ... end

Indexed Functor hierarchy

module Indexed_functor : sig ... end
module Indexed_alt : sig ... end
module Indexed_apply : sig ... end
module Indexed_applicative : sig ... end
module Indexed_alternative : sig ... end
module Indexed_selective : sig ... end
module Indexed_bind : sig ... end
module Indexed_monad : sig ... end
module Indexed_monad_plus : sig ... end
module Indexed_comonad : sig ... end
module Indexed_foldable : sig ... end

Functor hierarchy

module Invariant : sig ... end
module Functor : sig ... end
module Alt : sig ... end
module Apply : sig ... end
module Applicative : sig ... end
module Alternative : sig ... end
module Selective : sig ... end
module Bind : sig ... end
module Monad : sig ... end
module Monad_plus : sig ... end
module Comonad : sig ... end
module Foldable : sig ... end
module Traversable : sig ... end

Contravariant hierarchy

module Contravariant : sig ... end
module Divisible : sig ... end
module Decidable : sig ... end

Bifunctor hierarchy

module Bifunctor : sig ... end

Profunctor hierarchy

module Profunctor : sig ... end
module Strong : sig ... end
module Choice : sig ... end
module Closed : sig ... end

Arrow hierarchy

module Semigroupoid : sig ... end
module Category : sig ... end
module Arrow : sig ... end
module Arrow_zero : sig ... end
module Arrow_alt : sig ... end
module Arrow_plus : sig ... end
module Arrow_choice : sig ... end
module Arrow_apply : sig ... end

Descriptions of laws

Describes a law as structured data.

module Law : sig ... end