
30 Oct
2009
30 Oct
'09
1:52 p.m.
On Fri, 2009-10-30 at 17:17 +0000, Neil Brown wrote:
Hi,
The GHC manual says that if you pass -cpp to GHC, it runs the C preprocessor, "cpp" on your code before compilation (http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#...). But why, in that case, does stringize not seem to work when the -cpp flag is given?
#define TR(f) (trace #f f)
What am I missing?
That ghc uses cpp in traditional mode so it does not grok new ANSI C things like cpp string concatenation. As I understand it we have to use traditional CPP because some modern features break Haskell code. Really we should all move over to cpphs. Duncan