[Haskell-cafe] GLfloat on a Mac

Conor McBride conor at strictlypositive.org
Tue Aug 12 05:11:49 EDT 2008


Hi folks

I thought I'd try a bit of OpenGL. Perhaps I should
send this to the more specific list, but perhaps
other people are, like me, trying out a variety of
UI technology. I thought I'd give OpenGL a go, because
I saw the name whizz by when I upgraded to 6.8.3. I
found the tutorial and got copy-paste cracking.

It was all going swimmingly while I did almost nothing,
but then ghc started dying on me. I chopped down my
failing code to this joyous specimen:

HelloWorld.lhs contains

----------------------------------

 > module Main where

 > import Graphics.Rendering.OpenGL
 > import Graphics.UI.GLUT

 > myFloat :: GLfloat
 > myFloat = 0.0

 > main = return ()

----------------------------------

$ ghc -package GLUT HelloWorld.lhs -o HelloWorld
Illegal instruction

I'm using ghc 6.8.3 on a Mac PowerBook G4. Googling
"OpenGL illegal instruction" produced an unending
choice of horror stories.

What message am I not getting? Is there some crucial
manual I'm not reading? Is there something which we
should be being told on the relevant wiki page?

Distressed

Conor



More information about the Haskell-Cafe mailing list