Module

Test.QuickCheck.Laws.Control.Alternative

Package
purescript-quickcheck-laws
Repository
purescript-contrib/purescript-quickcheck-laws

#checkAlternative Source

checkAlternative :: forall f. Alternative f => Arbitrary (f (A -> B)) => Arbitrary (f A) => Eq (f A) => Eq (f B) => Proxy f -> Effect Unit
  • Distributivity: (f <|> g) <*> x == (f <*> x) <|> (g <*> x)
  • Annihilation: empty <*> x = empty

#checkAlternativeGen Source

checkAlternativeGen :: forall f. Alternative f => Eq (f A) => Eq (f B) => Gen (f A) -> Gen (f (A -> B)) -> Proxy f -> Effect Unit