Brief version:
Please define the cpp macro
__HASKELL_VERSION__=98
for all Haskell 98 implementations.
Verbose version:
Many Haskell hackers are in the process of "upgrading" their code to
Haskell 98 in the hope of easing the version management. In this process a
lot of preprocessor hacking is used to make source files that works for
different haskell versions and haskell compilers. We have already seen a
description of the current chaotic state of affairs when it comes to
determine the haskell version in different compilers. It would be nice to
at least have a standard symbol defined across all compilers to indicate
if the haskell version is Haskell 98 or not, and I think this needs to be
decided quickly, before more code is converted to using ad-hoc solutions
to this problem.
There are of course a number of ways of doing this, and I don't really
care which it is, but in trying to get this decided quickly I will only
pick one suggestion instead of displaying the whole variety of choices.
I suggest using the macro
__HASKELL_VERSION__=98
I would like to see replies from hugs, ghc, hbc and nhc maintainers and
from Haskell programmers who have had to use preprocessor macros in their
Haskell code. If you reply directly to me I can make a summary in a week
or so.
It would nice if __HASKELL_VERSION__ could be undefined or numerically
smaller for earlier versions and numerically bigger for future versions.
If we can decide on a different symbol that is fine, as long as something
is agreed on. My view is purely pragmatic, I don't care if this is a
formal standard or not as long as it is supported by the current
implementations. If it gets used it will become a standard sooner or
later.
Patrik Jansson, Chalmers
http://www.cs.chalmers.se/~patrikj/