Skip to content

Commit 75b22c0

Browse files
committed
Improve Arb instance
1 parent 211fc82 commit 75b22c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/Tests.purs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ check2 = quickCheck
6363
instance arbAToMaybeB :: (Arb (a -> b)) => Arb (a -> Maybe b) where
6464
arb = do
6565
f <- arb
66-
return $ \x -> Just (f x)
66+
jn <- arb
67+
return $ \x -> if jn then Just (f x) else Nothing
6768

6869
instance showAToMaybeB :: (Arb (a -> b)) => Show (a -> Maybe b) where
6970
show _ = "<a -> Maybe b>"

0 commit comments

Comments
 (0)