Preface_lawsThe 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.
module Semigroup : sig ... endmodule Monoid : sig ... endmodule Meet_semilattice : sig ... endmodule Join_semilattice : sig ... endmodule Bounded_meet_semilattice : sig ... endmodule Bounded_join_semilattice : sig ... endmodule Bounded_lattice : sig ... endmodule Lattice : sig ... endmodule Indexed_functor : sig ... endmodule Indexed_alt : sig ... endmodule Indexed_apply : sig ... endmodule Indexed_applicative : sig ... endmodule Indexed_alternative : sig ... endmodule Indexed_selective : sig ... endmodule Indexed_bind : sig ... endmodule Indexed_monad : sig ... endmodule Indexed_monad_plus : sig ... endmodule Indexed_comonad : sig ... endmodule Indexed_foldable : sig ... endmodule Invariant : sig ... endmodule Functor : sig ... endmodule Alt : sig ... endmodule Apply : sig ... endmodule Applicative : sig ... endmodule Alternative : sig ... endmodule Selective : sig ... endmodule Bind : sig ... endmodule Monad : sig ... endmodule Monad_plus : sig ... endmodule Comonad : sig ... endmodule Foldable : sig ... endmodule Traversable : sig ... endmodule Contravariant : sig ... endmodule Divisible : sig ... endmodule Decidable : sig ... endmodule Bifunctor : sig ... endmodule Profunctor : sig ... endmodule Strong : sig ... endmodule Choice : sig ... endmodule Closed : sig ... endmodule Semigroupoid : sig ... endmodule Category : sig ... endmodule Arrow : sig ... endmodule Arrow_zero : sig ... endmodule Arrow_alt : sig ... endmodule Arrow_plus : sig ... endmodule Arrow_choice : sig ... endmodule Arrow_apply : sig ... endDescribes a law as structured data.
module Law : sig ... end