In brief:

   Define __HASKELL__=98 and __HASKELL98__ as preprocessor macros for all
   Haskell 98 compilers.

I would like to hear from from maintainers of ghc, hbc and nhc if this can
be accepted as a "de facto" standard. Please make the (small) change to
the compiler or reply with a good reason not to. 

A few weeks ago I asked for opinions on preprocessor symbols for compilers
of Haskell 98. I have summarized the discussion at

  http://www.cs.chalmers.se/~patrikj/haskell/cpp/

and I include the first sections below.

Patrik Jansson

                      Preprocessor symbols and Haskell 98

Proposal:
   
   Define __HASKELL__=98 and __HASKELL98__ as preprocessor macros for all
   Haskell 98 compilers.
   
  __HASKELL__=98 
   
   This is already defined for all three compilers, but nhc gives it a
   value to distinguish between Haskell versions. This would be useful
   also for ghc and hbc.

  __HASKELL98__
   
   As ghc and hbc use it already, nhc is in minority.

Current status of Haskell 98 compilers:

   (nhc98, ghc 4.04 and hbc 0.9999.5b (as yet unreleased))
   __HASKELL__
          Defined by ghc, hbc and nhc. In nhc it has the value 98.
   __HASKELL98__
          Defined by ghc, hbc
   __HASKELL_98__
          Defined by hbc, nhc
   __HASKELL1__=5
          Defined by ghc, hbc. Ugly!






Reply via email to