Hi, could you provide us a simple example of how to use your tests to test if a functor instance is ok?
Thanks
example below
class Functor f where
fmap :: (a -> b) -> f a -> f b
data Tree a = Leaf a | Node (Tree a) (Tree a)
deriving Show
{-|
Example:
>fmap (+1) ( Node (Leaf 1) (Leaf 2) )
-}
instance Functor Tree where
fmap f (Leaf a) = Leaf (f a)
fmap f (Node a b) = Node (fmap f a) (fmap f b)
Hi, could you provide us a simple example of how to use your tests to test if a functor instance is ok?
Thanks
example below