Hi All,

What is the easiest and/or best way to define global "constants" in Haskell (avoiding any side effects, of course). The functionality I'm thinking of is similar to the use of global "const" variables or #defines in C code.

Judging from this article (http://www.lochan.org/keith/publications/hspp-hw99.ps.gz) and the existence of the GHC -cpp command-line option, it seems that it is possible to use the C preprocessor on Haskell code. However, the article is fairly old ('99)... Is this still (or was it ever) the best way? The point of the article is that it's not... were any of the "Haskell preprocessor" suggestions in the paper (dubbed "HsPP") adopted by GHC, and can we use them?

There also seems to be a (almost fully) native implementation of a Haskell preprocessor in Hackage (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/cpphs). Does anybody use it?

What would you use if you wanted such functionality?

Thanks!
Mike