
9 Jun
2011
9 Jun
'11
10:11 p.m.
Hello, On Thu, Jun 09, 2011 at 03:44:43PM +0200, Johan Tibell wrote:
... I initially tried to use the CPP ## string concatenation operator to create unique names (tedious, but works) but GHC runs CPP in traditional mode so that doesn't work.
One -traditional way that I have used to concatenate pieces of C code is demonstrated by:
$ cat t.c #define s(z) z s(a)s(b) $ gcc t.c -E # 1 "t.c" # 1 "<built-in>" # 1 "<command-line>" # 1 "t.c"
a b $ gcc t.c -E -traditional # 1 "t.c" # 1 "<built-in>" # 1 "<command-line>" # 1 "t.c"
ab $
...
Best regards Thorkil