@@ -6,7 +6,7 @@ import Effect (Effect)
6
6
import Test.Spec (Spec , describe , it )
7
7
import Test.Spec.Assertions (shouldEqual , shouldSatisfy , AnyShow (..))
8
8
import Test.QuickCheck ((===), (<?>))
9
- import Test.QuickCheck.Arbitrary (class Arbitrary )
9
+ import Test.QuickCheck.Arbitrary (class Arbitrary , class Coarbitrary )
10
10
import Test.Spec.QuickCheck (quickCheck , quickCheck' )
11
11
import Test.Spec.Runner.Node (runSpecAndExitProcess )
12
12
import Test.Spec.Reporter.June.Pretty (prettyReporter )
@@ -80,7 +80,6 @@ import Control.Extend (duplicate)
80
80
import Data.Identity (Identity )
81
81
import Data.Distributive (distribute )
82
82
import Data.List.NonEmpty as NEL
83
- import Data.Eq (class Eq1 )
84
83
85
84
iff :: forall a . Boolean -> a -> Maybe a
86
85
iff = ($>) <<< guard
@@ -227,10 +226,18 @@ applySuite = describe "Apply and Applicative" do
227
226
genericApplicativeLaws " Trivial1" (Proxy :: Proxy (Trivial1 Int ))
228
227
229
228
230
- genericApplicativeLaws :: forall t a . Eq (t a ) => Show (t a ) => Applicative t => String -> Proxy (t a ) -> Spec Unit
229
+ genericApplicativeLaws :: forall t a .
230
+ Eq (t a ) =>
231
+ Show (t a ) =>
232
+ Applicative t =>
233
+ Arbitrary a =>
234
+ Coarbitrary a =>
235
+ Arbitrary (t a ) =>
236
+ Arbitrary (t (a -> a )) =>
237
+ String -> Proxy (t a ) -> Spec Unit
231
238
genericApplicativeLaws name _ = describe (" Applicative " <> name <> " identities" ) do
232
239
it " Associative composition: (<<<) <$> f <*> g <*> h ≡ f <*> (g <*> h)" do
233
- quickCheck \(f :: t (_ -> a )) g (h :: t a ) -> (<<<) <$> f <*> g <*> h === f <*> (g <*> h)
240
+ quickCheck \(f :: t (a -> a )) g (h :: t a ) -> (<<<) <$> f <*> g <*> h === f <*> (g <*> h)
234
241
235
242
enumSuite :: Spec Unit
236
243
enumSuite = describe " enums" do
0 commit comments