Compiling HOpenGL Examples with GHC 6.2 Mac OS

Hi, I'm a Haskell newbee and try to compile the HOpenGL Examples with GHC 6.2 Mac OS X with it's build in openGL stuff, by giving ghc --make Cube.hs the answer is :"not find module GLUT and GL", which is understandable because in the Cube.hs there is the code import GL import GLU But how to say ghc what he needs ? Is it -addpackage or -l option (in other words "import" is the same as include in C?) ? BTW: In the HOpenGL distribution, in the directory lib there is a file GL.hs and GLUT.hs which I think are the files needed for teh example above. But I don't found these files in the new GHC 6.2 distribution, is that correct ? Thanks for your help. Greetings Hans

Hans Nikolaus Beck wrote:
I'm a Haskell newbee and try to compile the HOpenGL Examples with GHC 6.2 Mac OS X with it's build in openGL stuff [...]
I guess you are using the GHC.6.2.dmg from the GHC download page. The problem is that the examples from the HOpenGL tar files are for the old API, for a slightly longer explanation see: http://haskell.org/pipermail/hopengl/2003-December/000454.html
ghc --make Cube.hs
That's fine, --make is all that is needed, but you should use the examples written for the new API. I don't know if they are shipped with the Mac OS X installer, but the bleeding edge examples are always available from: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/
[...] But how to say ghc what he needs ? Is it -addpackage or -l option (in other words "import" is the same as include in C?) ?
There are actually two parts:
* By simply writing
import Graphics.UI.GLUT
in your Haskell source you get all the definitions from the GLUT package
plus all the ones from the OpenGL package (i.e. GLU and GL stuff). This
is quite similar to
#include
participants (2)
-
HNBeck@t-online.de
-
Sven Panne