Skip to content

Commit ea89223

Browse files
yeah there we go
1 parent ccd9d5c commit ea89223

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/Main.purs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Effect (Effect)
66
import Test.Spec (Spec, describe, it)
77
import Test.Spec.Assertions (shouldEqual, shouldSatisfy, AnyShow(..))
88
import Test.QuickCheck ((===), (<?>))
9-
import Test.QuickCheck.Arbitrary (class Arbitrary)
9+
import Test.QuickCheck.Arbitrary (class Arbitrary, class Coarbitrary)
1010
import Test.Spec.QuickCheck (quickCheck, quickCheck')
1111
import Test.Spec.Runner.Node (runSpecAndExitProcess)
1212
import Test.Spec.Reporter.June.Pretty (prettyReporter)
@@ -80,7 +80,6 @@ import Control.Extend (duplicate)
8080
import Data.Identity (Identity)
8181
import Data.Distributive (distribute)
8282
import Data.List.NonEmpty as NEL
83-
import Data.Eq (class Eq1)
8483

8584
iff :: forall a. Boolean -> a -> Maybe a
8685
iff = ($>) <<< guard
@@ -227,10 +226,18 @@ applySuite = describe "Apply and Applicative" do
227226
genericApplicativeLaws "Trivial1" (Proxy :: Proxy (Trivial1 Int))
228227

229228

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
231238
genericApplicativeLaws name _ = describe ("Applicative " <> name <> " identities") do
232239
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)
234241

235242
enumSuite :: Spec Unit
236243
enumSuite = describe "enums" do

0 commit comments

Comments
 (0)