[darcs-devel] darcs patch: replace '{-# OPTIONS' with '{-# OPTIONS_GHC'

Josef Svenningsson josef.svenningsson at gmail.com
Mon Apr 21 11:29:52 UTC 2008


On Mon, Apr 21, 2008 at 12:42 PM, David Roundy <droundy at darcs.net> wrote:
>
> On Fri, Apr 18, 2008 at 10:45:50PM -0400, gwern0 at gmail.com wrote:
>  > Fri Apr 18 22:40:27 EDT 2008  gwern0 at gmail.com
>  >   * replace '{-# OPTIONS' with '{-# OPTIONS_GHC'
>  >   These OPTIONS pragmas use GHC-isms; best practice is to make them GHC specific if they are GHC specific.
>  >   Specifically: -fglasgow-exts is obviously GHC only. -cpp is used only by GHC AFAIK - hugs uses some hugscpp, YHC uses '--cpp' as does presumably NHC, JHC doesn't support cpp, and no idea about the others.
>  >   However, this patch omits modifying "src/Darcs/ColourPrinter.lhs", "src/Workaround.hs", and "src/win32/CtrlC.hs" because I was uncertain whether '-fno-warn-orphans', '-w', and '-ffi' are actually GHC-only.
>
>  I'm hesitant to apply this patch, just because I have some vague memory
>  that an older version of ghc didn't accept OPTIONS_GHC.  I've definitely
>  seen and rejected a patch like this before for portability reasons.  Given
>  that it doesn't make darcs any more portable, and might make it less
>  portable, it seems to be of rather dubious value.
>
>  A quick googling didn't show up any history of the OPTIONS_GHC pragma.  Do
>  you have any idea whether this would work with ghc 6.4?

http://www.haskell.org/ghc/docs/6.4/html/users_guide/pragmas.html#options-pragma

OPTIONS_GHC was apparently introduced in 6.4.

Cheers,

Josef


More information about the darcs-devel mailing list