Re: [Haskell] ANNOUNCE: OpenGL 2.3.0.0

Am Sonntag, 2. August 2009 13:50:08 schrieb Paul L:
Thanks for the reply. If the issue was caused by an "API bug", I'm actually not sure if this "API bug" has been fixed. Compare
http://hackage.haskell.org/packages/archive/OpenGL/2.2.3.0/doc/html/Graphic s-Rendering-OpenGL-GL-VertexSpec.html#t%3AVertexComponent
to
http://hackage.haskell.org/packages/archive/OpenGL/2.3.0.0/doc/html/Graphic s-Rendering-OpenGL-GL-VertexSpec.html#t%3AVertexComponent
You can see that either Int16/Int32/Float/Double (in older versions) or CShort/CInt/CFloat/CDouble (in the new version) are listed as instances, not GLshort/GLint/GLfloat/GLdouble.
This is less of a "real" bug, but it's certainly misleading. Maybe you can get it fixed by using -XTypeSynonymInstances.
I am well aware of the fact the documentation is not optimal at the moment, but I am not willing to sacrifice portability for this tiny issue, so the flag you mention is not an option. In former releases I used an ugly CPP hack to improve the documentation a bit, but this feels wrong IMHO. The recent change from the sized Int/Word types to the C types was a consequence of removing autoconf, the next step will be using the C types wrapped in newtypes. This is the right way to do it, and it will fix the documentation, too. If you do not make any assumptions about the actual representations (i.e. use fromIntegral and friends when needed), this further change will not affect any portable code. Cheers, S.
participants (1)
-
Sven Panne