Fwd: [Haskell-cafe] frag game-compiling error

---------- Forwarded message ----------
From: selahaddin gerdan
vacuum-opengl after I had upgraded my opengl. I patched it up using a "from<numeric type>" call.
On Mon, Sep 28, 2009 at 8:00 AM, selahaddin gerdan
wrote: Hi there, when I try to install frag,I get this error:
.cabal/bin/cabal install frag Resolving dependencies... Downloading frag-1.1.2... Configuring frag-1.1.2... Preprocessing executables for frag-1.1.2... Building frag-1.1.2... [ 1 of 39] Compiling IdentityList ( src/IdentityList.hs, dist/build/frag/frag-tmp/ IdentityList.o ) [ 2 of 39] Compiling Quaternion ( src/Quaternion.hs, dist/build/frag/frag-tmp/Quaternion.o )
src/Quaternion.hs:22:27: Couldn't match expected type `GLfloat' against inferred type `Float' In the expression: (r00 :: GLfloat) In the second argument of `newMatrix', namely `[(r00 :: GLfloat), r01, r02, r03, ....]' In the expression: newMatrix ColumnMajor [(r00 :: GLfloat), r01, r02, r03, ....] cabal: Error: some packages failed to install: frag-1.1.2 failed during the building phase. The exception was: exit: ExitFailure 1
Why? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Sep 28, 2009 at 01:57:03PM +0300, selahaddin gerdan wrote:
Sorry I'm just learning haskell, so I don't get your suggestion. Could you explain to me what exactly I have to do?
According to thishttp://cvs.haskell.org/Hugs/pages/libraries/OpenGL/Graphics-Rendering-OpenGL...page GLfloat is just a type synonym for type Float. How come the error message differentiates between them?
That's not the latest documentation, you should go to [1] if you want it. Nowadays GLfloat isn't a type synonym anymore[2]. HTH, [1] http://hackage.haskell.org/package/OpenGL [2] http://hackage.haskell.org/packages/archive/OpenGLRaw/1.1.0.0/doc/html/Graph... -- Felipe.

src/Quaternion.hs:22:27
This would probably be the place to start.
On Mon, Sep 28, 2009 at 7:28 PM, Felipe Lessa
On Mon, Sep 28, 2009 at 01:57:03PM +0300, selahaddin gerdan wrote:
Sorry I'm just learning haskell, so I don't get your suggestion. Could you explain to me what exactly I have to do?
According to thishttp://cvs.haskell.org/Hugs/pages/libraries/OpenGL/Graphics-Rendering-OpenGL...page GLfloat is just a type synonym for type Float. How come the error message differentiates between them?
That's not the latest documentation, you should go to [1] if you want it. Nowadays GLfloat isn't a type synonym anymore[2].
HTH,
[1] http://hackage.haskell.org/package/OpenGL [2] http://hackage.haskell.org/packages/archive/OpenGLRaw/1.1.0.0/doc/html/Graph...
-- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Lyndon Maydwell wrote:
src/Quaternion.hs:22:27
This would probably be the place to start.
Ok,I managed to get past the error like this: newMatrix ColumnMajor [realToFrac r00,realToFrac r01,realToFrac r02,realToFrac r03, realToFrac r10,realToFrac r11,realToFrac r12,realToFrac r13, realToFrac r20,realToFrac r21,realToFrac r22,realToFrac r23, realToFrac r30,realToFrac r31,realToFrac r32,realToFrac r33] So Quaternion.hs compiled fine,but now it gives error messages in another file. As far as I understand, this games code is incompatible with the new version of haskell opengl libraries. Am I right? -- View this message in context: http://www.nabble.com/frag-game-compiling-error-tp25638949p25645411.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

On Mon, Sep 28, 2009 at 11:36 AM, selahaddin
Lyndon Maydwell wrote:
src/Quaternion.hs:22:27
This would probably be the place to start.
Ok,I managed to get past the error like this:
newMatrix ColumnMajor [realToFrac r00,realToFrac r01,realToFrac r02,realToFrac r03, realToFrac r10,realToFrac r11,realToFrac r12,realToFrac r13, realToFrac r20,realToFrac r21,realToFrac r22,realToFrac r23, realToFrac r30,realToFrac r31,realToFrac r32,realToFrac r33]
So Quaternion.hs compiled fine,but now it gives error messages in another file. As far as I understand, this games code is incompatible with the new version of haskell opengl libraries. Am I right?
A style note: it looks to me like it'd be better to write 'newMatrix columnMajor $ map realToFrac $ [r1...' Did that get Frag compiling & working? If it did, perhaps you could send in a patch to dons, who is the listed maintainer of frag. -- gwern

gwern0:
On Mon, Sep 28, 2009 at 11:36 AM, selahaddin
wrote: Lyndon Maydwell wrote:
src/Quaternion.hs:22:27
This would probably be the place to start.
Ok,I managed to get past the error like this:
newMatrix ColumnMajor [realToFrac r00,realToFrac r01,realToFrac r02,realToFrac r03, realToFrac r10,realToFrac r11,realToFrac r12,realToFrac r13, realToFrac r20,realToFrac r21,realToFrac r22,realToFrac r23, realToFrac r30,realToFrac r31,realToFrac r32,realToFrac r33]
So Quaternion.hs compiled fine,but now it gives error messages in another file. As far as I understand, this games code is incompatible with the new version of haskell opengl libraries. Am I right?
A style note: it looks to me like it'd be better to write 'newMatrix columnMajor $ map realToFrac $ [r1...'
Did that get Frag compiling & working? If it did, perhaps you could send in a patch to dons, who is the listed maintainer of frag.
Please send patches!
participants (6)
-
Don Stewart
-
Felipe Lessa
-
Gwern Branwen
-
Lyndon Maydwell
-
selahaddin
-
selahaddin gerdan