module Test.Lawful.Types
(
Laws,
Law,
discard,
assert,
)
where
type Laws m = [(String, Law m)]
type Law m = m (Maybe Bool)
discard :: (Applicative m) => Law m
discard :: forall (m :: * -> *). Applicative m => Law m
discard = Maybe Bool -> m (Maybe Bool)
forall a. a -> m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Maybe Bool
forall a. Maybe a
Nothing
assert :: (Applicative m) => Bool -> Law m
assert :: forall (m :: * -> *). Applicative m => Bool -> Law m
assert = Maybe Bool -> m (Maybe Bool)
forall a. a -> m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Maybe Bool -> m (Maybe Bool))
-> (Bool -> Maybe Bool) -> Bool -> m (Maybe Bool)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Maybe Bool
forall a. a -> Maybe a
Just