
2 Jan
2011
2 Jan
'11
8:16 a.m.
On Sunday 02 January 2011 13:45:13, Robert Clausecker wrote:
I guess the easiest way would be to use CPP, but is there any flag for the wordsize?
Not directly, but I think {-# LANGUAGE CPP #-} #include "MachDeps.h" #if WORD_SIZE_IN_BITS == 32 type MyGen = MyGen32 #else // GHC only works with 32- and 64-bit words type MyGen = MyGen64 #endif should do it. MachDeps.h ties you to GHC of course, if you want it to work on other compilers too, I guess you need a configure script.