Hi,

I'm looking for a way to set a GHC compile option on a specific module
(not every module in the program) but only for a specific version of
GHC. Ideally within the confines of cabal, and in a portable way.

GHC provides the OPTIONS_GHC pragma, but it does not appear to provide
a way for the pragma to fire for specific versions of GHC. Also, I
can't use an #ifdef trick because "File-header pragmas are read once
only, before pre-processing the file (e.g. with cpp)."

Cabal provides conditional statements and a way to check the version
of GHC, but I can't see a way to get it to only use certain compiler
options for a particular module.

In summary, what I really want is a modified version of the OPTIONS_GHC pragma:

   {-# OPTIONS_GHC ==6.12.1 ... #-}

or a way to tell cabal to use certain compiler options for a
particular module under certain conditions.

Cheers,
Bernie.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to