id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
2464	Allow #ifdef'd pragmas	ajd	simonmar	"Sometimes I want to do something like

{{{
{-# LANGUAGE CPP #-}
#ifdef RUN_TESTS
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
#endif

module Foo
  where

#ifdef RUN_TESTS
import Test.QuickCheck
#endif

newtype Bar = Bar Int
#ifdef RUN_TESTS
  deriving Arbitrary
#endif

...

}}}

especially (like in that example) for embedding testing code in my modules. I want to #ifdef the pragma so that my code stays Haskell98 when it's only being used, not tested, but this doesn't seem to work.

I suppose this would require two passes of looking for pragmas if CPP was invoked; one before CPP and one after, because the -XCPP option can be invoked in a pragma."	bug	closed	normal	7.0.1	Driver	6.8.2	fixed			Unknown/Multiple	Unknown/Multiple	GHC rejects valid program	Moderate (less than a day)				
