smallcheck-laws-0.1: SmallCheck properties for standard type classes
Test.SmallCheck.Laws.Functor
Contents
Synopsis
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:
Functor
Series
fmap id ≡ id
fmap
id
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