Module

Test.QuickCheck.Laws.Control.Applicative

#checkApplicative

checkApplicative :: forall f. Applicative f => Arbitrary (f A) => Arbitrary (f (A -> B)) => Arbitrary (f (B -> C)) => Eq (f A) => Eq (f B) => Eq (f C) => Proxy f -> Effect Unit
  • Identity: (pure identity) <*> v = v
  • Composition: (pure (<<<)) <*> f <*> g <*> h = f <*> (g <*> h)
  • Homomorphism: (pure f) <*> (pure x) = pure (f x)
  • Interchange: u <*> (pure y) = (pure ($ y)) <*> u

#checkApplicativeGen

checkApplicativeGen :: forall f. Applicative f => Eq (f A) => Eq (f B) => Eq (f C) => Gen (f A) -> Gen (f (A -> B)) -> Gen (f (B -> C)) -> Effect Unit

Modules