comments:

Just for completeness: You need the derive package (hackage.haskell.org/package/derive) for this to work. Also, as of GHC 6.12 you can simply use deriving Functor in your code (by using the -XDerivingFunctor extension).

Other Answer2

While I think Rüdiger's answer is the best one I just wanted to add that in GHC 6.12 you can automatically derive a Functor instance for your datatype: