[darcs-users] darcs patch: Replace Autoconf.hs with consistent use of CPP.

Petr Rockai me at mornfall.net
Thu Feb 19 18:45:12 UTC 2009

"Trent W. Buck" <trentbuck at gmail.com> writes:
>> >  norm_slashes :: String -> String
>> > hunk ./src/SHA1.hs 18
>> >  -- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
>> >  -- Boston, MA 02110-1301, USA.
>> >  
>> > -{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
>> > +{-# OPTIONS_GHC -fno-warn-name-shadowing -cpp #-}
>> > +{-# LANGUAGE CPP #-}
>> Did we miss those in other places? (I guess no if it compiles for you...)
> This was the only file that didn't already mention CPP in this manner, but
> I admit I don't understand this bit fully.
This directs cabal/ghc/whatever (I guess ghc) to pipe the file through cpp
before processing it normally. If you omit it, you would probably get compile
errors. Moreover, OPTIONS_GHC is needed for older versions, while LANGUAGE Foo
is preferred with new versions of GHC.


Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation

More information about the darcs-users mailing list