[HOpenGL] Re: [Haskell-cafe] Decoupling OpenAL/ALUT packages from OpenGL

Sven Panne Sven.Panne at aedion.de
Sat May 16 11:18:07 EDT 2009


Am Montag, 11. Mai 2009 12:04:07 schrieb Neil Brown:
> [...] So possible additions to your type-class list are Foldable and maybe
> Traversable (no harm, although I'd have to reach further for an example
> for this).  I guess the tricky decision might be whether to provide a
> Num instance  (again, probably more suitable for Vector2)? [...]

OK, I've added a bunch of instances for all vertex attribute types in the 
OpenGL 2.2.3.0 package. Let me know if there are standard classes for which 
you would like to see instances, too.

I've deliberately omitted instances for Num, because they are not correct from 
a mathematical point of view: You can't e.g. add two points (only a point and 
a vector), the difference between two points is not a point (it's a vector), 
etc.

Cheers,
   S.



More information about the HOpenGL mailing list