1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Law-check functions take their inputs by value by design: they are
// quickcheck-style value properties whose arguments are consumed test data,
// and the by-value signatures keep call sites free of reference noise.
//! # `OrdoFP` Laws
//!
//! This library contains property-based laws for testing implementations of
//! type classes declared in `OrdoFP`. Laws help ensure that your implementations
//! are mathematically correct and composable.
//!
//! ## Available Law Modules
//!
//! ### Core Algebraic Laws
//! - [`semigroup_laws`] - Associativity law for Semigroup
//! - [`monoid_laws`] - Identity laws for Monoid
//! - [`optics_laws`] - Lens (GetPut/PutGet/PutPut) and prism laws
//!
//! ### Functor Hierarchy Laws
//! - [`functor_laws`] - Identity and composition laws for GAT Functor
//! - [`applicative_laws`] - Laws for Applicative functors
//! - [`monad_laws`] - Left/right identity and associativity for Monad
//! - [`alternative_laws`] - Choice/failure laws for Alternative
//!
//! ### Async Type Class Laws (requires `async` feature)
//! - [`async_functor_laws`] - Identity and composition laws for `FunctorAsync`
//! - [`async_monad_laws`] - Left/right identity and associativity for `MonadAsync`
//!
//! ### Other Type Class Laws
//! - [`foldable_laws`] - Consistency laws for Foldable
//! - [`traversable_laws`] - Identity, naturality laws for Traversable
//! - [`comonad_laws`] - Extract/extend laws for Comonad
//! - [`bifunctor_laws`] - Identity and composition for Bifunctor
//! - [`category_laws`] - Identity and associativity laws for Category
//! - [`fixpoint_laws`] - Laws relating `Fix`, `cata`, and `ana`
//!
//! ## Usage with `QuickCheck`
//!
//! ```ignore
//! use ordofp_laws::functor_laws;
//! use quickcheck::quickcheck;
//!
//! quickcheck(functor_laws::identity::<Option<i32>> as fn(Option<i32>) -> bool);
//! ```
extern crate ordofp;
extern crate quickcheck;
// Core algebraic laws
// Functor hierarchy laws
// Async type class laws
// Other type class laws