Derive Functor, Traversable and Foldable instances