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?

Cheers,
   Sven
-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.informatik.uni-muenchen.de/~Sven.Panne

Reply via email to