When working with derived instances in Haskell, is it possible to derive functions for arbitrary types, or are we restricted to particular functions?
You can derive instances of the following classes in haskell 98: Eq, Ord, Enum, Ix, Bounded, Read, and Show.
Using ghc extensions you can also derive instances of the following classes: Typeable, Data, Functor, Foldable and Traversable. There's also a ghc extension that allows a newtype to derive instances from its implementation type.
You can not derive instances of arbitrary classes for the simple reason that haskell would not know how to generate the necessary functions without special knowledge about the class in question.