class Functor f where map :: (a -> b) -> f a -> f b data Foo a = Foo a class Functor Foo where map f (Foo x) = Foo (f x) -- 6:1-7:30: Class Functor has already been defined in this module.