Skip to content

Failure on OPTION_* pramgas other than GHC

GHC should not attempt to look at other peoples pragmas. For example:

{-# OPTIONS_DERIVE --derive=Data,Typeable,Eq,Ord #-}
module Example where
data Foo = Bar

This worked fine with GHC 6.8, but doesn't with GHC 6.10. It says:

C:\Neil\derive>ghc Example.hs -c
Example.hs:1:11-48:
    unknown flag in  {-# OPTIONS #-} pragma: _DERIVE
Example.hs:1:11-48:
    unknown flag in  {-# OPTIONS #-} pragma: --derive=Data,Typeable,Eq,Ord

I consider this to be a major regression, as it breaks (amongst other things) the Yhc compiler, the Derive tool, and my thesis. I suspect it will also break anything Malcolm has set up with OPTION_YHC or OPTION_NHC pragmas.

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC ndmitchell@gmail.com
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information