Documentation ¶
Index ¶
- func AssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], ...) func(a A) booldeprecated
- func AssertLeftIdentity[HKTA, HKTB, A, B any](t *testing.T, eq E.Eq[HKTB], fofa func(A) HKTA, fofb func(B) HKTB, ...) func(a A) booldeprecated
- func AssertRightIdentity[HKTA, A any](t *testing.T, eq E.Eq[HKTA], fofa func(A) HKTA, ...) func(fa HKTA) booldeprecated
- func MonadAssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], ...) func(a A) bool
- func MonadAssertLeftIdentity[HKTA, HKTB, HKTFAB, A, B any](t *testing.T, eq E.Eq[HKTB], fofb pointed.Pointed[B, HKTB], ...) func(a A) bool
- func MonadAssertRightIdentity[HKTA, HKTAA, A any](t *testing.T, eq E.Eq[HKTA], ma monad.Monad[A, A, HKTA, HKTA, HKTAA]) func(fa HKTA) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertLaws
deprecated
func AssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], fofa func(A) HKTA, fofb func(B) HKTB, fofc func(C) HKTC, fofaa func(func(A) A) HKTAA, fofab func(func(A) B) HKTAB, fofbc func(func(B) C) HKTBC, fofabb func(func(func(A) B) B) HKTABB, faa func(HKTA, func(A) A) HKTA, fab func(HKTA, func(A) B) HKTB, fac func(HKTA, func(A) C) HKTC, fbc func(HKTB, func(B) C) HKTC, fmap func(HKTBC, func(func(B) C) func(func(A) B) func(A) C) HKTABAC, chainaa func(HKTA, func(A) HKTA) HKTA, chainab func(HKTA, func(A) HKTB) HKTB, chainac func(HKTA, func(A) HKTC) HKTC, chainbc func(HKTB, func(B) HKTC) HKTC, fapaa func(HKTAA, HKTA) HKTA, fapab func(HKTAB, HKTA) HKTB, fapbc func(HKTBC, HKTB) HKTC, fapac func(HKTAC, HKTA) HKTC, fapabb func(HKTABB, HKTAB) HKTB, fapabac func(HKTABAC, HKTAB) HKTAC, ab func(A) B, bc func(B) C, ) func(a A) bool
AssertLaws asserts the apply laws `identity`, `composition`, `associative composition`, 'applicative identity', 'homomorphism', 'interchange', `associativity`, `left identity`, `right identity`
Deprecated: use MonadAssertLaws instead
func AssertLeftIdentity
deprecated
func AssertRightIdentity
deprecated
func MonadAssertLaws ¶ added in v1.0.127
func MonadAssertLaws[HKTA, HKTB, HKTC, HKTAA, HKTAB, HKTBC, HKTAC, HKTABB, HKTABAC, A, B, C any](t *testing.T, eqa E.Eq[HKTA], eqb E.Eq[HKTB], eqc E.Eq[HKTC], fofc pointed.Pointed[C, HKTC], fofaa pointed.Pointed[func(A) A, HKTAA], fofbc pointed.Pointed[func(B) C, HKTBC], fofabb pointed.Pointed[func(func(A) B) B, HKTABB], fmap functor.Functor[func(B) C, func(func(A) B) func(A) C, HKTBC, HKTABAC], fapabb applicative.Applicative[func(A) B, B, HKTAB, HKTB, HKTABB], fapabac applicative.Applicative[func(A) B, func(A) C, HKTAB, HKTAC, HKTABAC], maa monad.Monad[A, A, HKTA, HKTA, HKTAA], mab monad.Monad[A, B, HKTA, HKTB, HKTAB], mac monad.Monad[A, C, HKTA, HKTC, HKTAC], mbc monad.Monad[B, C, HKTB, HKTC, HKTBC], ab func(A) B, bc func(B) C, ) func(a A) bool
MonadAssertLaws asserts the apply laws `identity`, `composition`, `associative composition`, 'applicative identity', 'homomorphism', 'interchange', `associativity`, `left identity`, `right identity`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.