On 4/16/07, Isaac Dupree <isaacdupree@charter.net> wrote:
The code generated by Alex is perfectly good Haskell98+cpp, except:

#if __GLASGOW_HASKELL__ >= 603
#include "ghcconfig.h"
#else
#include "config.h"
#endif

If that "else" is modified to only trigger if we're using GHC at all[1],
then plain C pre-processing[2] makes it run fine in Hugs, too.

[1] (which I don't know how to do, I actually just deleted the line
#include "config.h"
from the generated file)

Guarding the whole block with #ifdef __GLASGOW_HASKELL__ should do it.



Cheers,

    Dinko