Sven Panne <[EMAIL PROTECTED]> wrote,
> Simon Marlow wrote:
> > If you can #include the header file into the Haskell source, then
> > you can get away without litlits.
>
> Of course, in the general (and in the OpenGL/GLUT) case you can't.
>
> > If your header file contains extra gumph like prototypes and stuff,
> > you can use this little trick: [...]
>
> Coooool trick, really! Didn't know the -dM flag. But again in my case
> it doesn't help: Depending on the OpenGL version there are #defines
> or a big enum. So the only portable way without litlits would be a
> small automatically generated C program that is run as part of
> HOpenGL's configuration process and outputs Haskell definitions or
> #defines for all needed constants. Aaaargl...
>
> Has anybody better ideas (coding tricks, extensions for the FFI, etc.)
> for a general solution to this problem?
How about I make the #define enum feature that we discussed
previously the next feature that gets implemented in
C->Haskell? That would solve the problem, wouldn't it?
Cheers,
Manuel
PS: I am just cleaning up the next release, which has much
better space performance for large headers. After that
I could do #define enums.