smallcheck-laws-0.1: SmallCheck properties for standard type classes

Safe HaskellSafe
LanguageHaskell2010

Test.SmallCheck.Laws.Functor

Contents

Synopsis

Functor laws

identity :: (Eq (f a), Monad m, Show (f a), Functor f) => Series m (f a) -> Property m Source

Check the identity law hold for the given Functor Series:

fmap idid

composition :: (Monad m, Functor f, Show a, Show b, Show c, Show (f a), Eq (f c), Serial Identity a, Serial Identity b) => Series m (f a) -> Series m (b -> c) -> Series m (a -> b) -> Property m Source

Check the composition law hold for the given Functor Series:

fmap (f . g) ≡ fmap f . fmap g