quickcheck-properties-0.1: QuickCheck properties for standard type classes.

Test.QuickCheck.Property.Functor

Description

Functor laws

 fmap id = id
 fmap f . fmap g = fmap (f . g)

Synopsis

Documentation

prop_FunctorId :: Functor f => T (f a) -> f a -> Equal (f a)Source

fmap id = id

prop_FunctorComposeSource

Arguments

:: Functor f 
=> (a -> b)

f

-> (b -> c)

g

-> T (f a) 
-> f a 
-> Equal (f c) 

It's not possible to generate arbitrary functions. Therefore they are passed as arguments.