Cabal is giving me mixed messages. When I say:
Extensions: DeriveFunctor
It says:
Warning: Unknown extensions: DeriveFunctor
But when I say:
GHC-Options: -XDeriveFunctor
It says:
Warning: Instead of 'ghc-options: -XDeriveFunctor' use 'extensions:
DeriveFunctor'
For now I’m just going to use the {-# LANGUAGE DeriveFunctor #-} pragma.
$ cabal --version
cabal-install version 0.8.2
using version 1.8.0.6 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.3
$ basename $(mdfind haskell-platform | grep .dmg)
haskell-platform-2010.2.0.0.i386.dmg
According to the Hackage documentation, as of Cabal-1.8.0.6
DeriveFunctoris not recognized. It’s a relatively new addition to GHC and it doesn’t seem to have wide use, so I’m not surprised it would have been overlooked for Cabal. This should probably be filed as a bug (feature request?) against Cabal.@Tom Lokhorst is right that a LANGUAGE pragma is the best option. I don’t like using Cabal’s Extensions field because then all extensions are active for all modules, which I often don’t want.