class Testable t where ... test :: Testable t => t -> Depth -> [TestCase] instance Testable Bool where ... instance ( Serial a, Testable b ) => Testable ( a -> b ) where ... test ( \ (x::Int) (y::Int) -> x+y == y+x )