
Hi,
I installed GHC 6.4, but I don´t know how to running a program, like Planet.hs. I had this problem:
[root@medusaLinux redbook_HS]# ghc Planet.hs -v
Glasgow Haskell Compiler, Version 6.4, for Haskell 98, compiled by GHC version 5.04.3
Using package config file: /usr/local/lib/ghc-6.4/package.conf
Hsc static flags: -static
*** Checking old interface for Main:
*** Parser:
*** Renamer/typechecker:
Planet.hs:15:0:
Failed to load interface for `GL':
Could not find module `
GL':
locations searched:
GL.hi
GL.hi-boot
*** Deleting temp files
Deleting: /tmp/ghc3765.s
Warning: deleting non-existent /tmp/ghc3765.s
Thanks,
Sandra
Lemmih
Hi,
At installation of HOpenGL, I had this problem: [snip]
HOpenGL is not a stand-alone package any more. Just install GHC 6.4 and it'll be there. -- Friendly, Lemmih __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/

On 5/2/05, Sandra Fontes
Hi,
I installed GHC 6.4, but I don´t know how to running a program, like Planet.hs. I had this problem: [snip]
You're using an old Planet.hs file. You can get the new one in [your-ghc-6.4dir]/libraries/GLUT/examples/RedBook/Planet.hs or download it here: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/~checkout~/fptools/libraries/GLUT/...
Thanks, Sandra
Lemmih
wrote: On 4/28/05, Sandra Fontes wrote: Hi,
At installation of HOpenGL, I had this problem: [snip]
HOpenGL is not a stand-alone package any more. Just install GHC 6.4 and it'll be there.
-- Friendly, Lemmih
__________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/
-- Friendly, Lemmih

Hi, Ok, there are some things you have to know: 1. You have to tell ghc, that you want the HOpenGl Package when you compile some stuff that needs HOpenGL. You can do this with ghc -package OpenGL 2. It is maybe a good idea to use the --make option. That checks the dependencies. I think that will not solve your problem. For some reason the ghc doesn't find the right files. It looks like that you use the (old) samples from the separate HOpenGL package. You have to use the samples from the ghc source under: ghc-6.4/libraries/GLUT/examples/RedBook/Planet.hs That is very important because the HOpenGL package from the website is very different from the ghc HOpenGL package. These two things have different APIs... So try this: Go to the ghc website and download the ghc6.4 source. Go to the path: libraries/GLUT/examples/RedBook/ and then try to compile the sample with ghc --make -package OpenGL Planet.hs This should work. Cheers Patrick On Monday 02 May 2005 16:58, Sandra Fontes wrote:
Hi,
I installed GHC 6.4, but I don´t know how to running a program, like Planet.hs. I had this problem:
[root@medusaLinux redbook_HS]# ghc Planet.hs -v Glasgow Haskell Compiler, Version 6.4, for Haskell 98, compiled by GHC version 5.04.3 Using package config file: /usr/local/lib/ghc-6.4/package.conf Hsc static flags: -static *** Checking old interface for Main: *** Parser: *** Renamer/typechecker: Planet.hs:15:0: Failed to load interface for `GL': Could not find module ` GL': locations searched: GL.hi GL.hi-boot *** Deleting temp files Deleting: /tmp/ghc3765.s Warning: deleting non-existent /tmp/ghc3765.s
Thanks, Sandra
Lemmih
wrote: On 4/28/05, Sandra Fontes wrote:
Hi,
At installation of HOpenGL, I had this problem:
[snip]
HOpenGL is not a stand-alone package any more. Just install GHC 6.4 and it'll be there.

1. You have to tell ghc, that you want the HOpenGl Package when you compile some stuff that needs HOpenGL. You can do this with
in addition to the graphics (-package OpenGL), you also need some GUI, most likely GLUT (-package GLUT), if you're compiling red book examples. "ghc-pkg list" for ghc 6.4 should list "OpenGL-2.0, GLUT-2.0". as has been pointed out already, these differ substantially from the early tarballs. if you do "ghc-pkg describe GLUT", you'll see that the GLUT package depends on the OpenGL package, so it is sufficient to specify "-package GLUT" on the command line to get both. even easier is to use "ghc --make", as that will now infer the packages that provide the modules you import, so you don't need to specify either of GLUT/OpenGL explicitly on the command line. something like the following should work for the red book examples: ghc --make <example>.hs -o <example> you can find out what packages are installed and how to get access to them here: http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html and the documentation for the OpenGL and GLUT packages is here: http://www.haskell.org/ghc/docs/latest/html/libraries/index.html cheers, claus
participants (4)
-
Claus Reinke
-
Lemmih
-
Patrick Scheibe
-
Sandra Fontes