How to write this correct...
Ketil Malde
ketil+haskell at ii.uib.no
Sun Feb 22 21:00:53 EST 2004
HNBeck at t-online.de (Hans Nikolaus Beck) writes:
> type GLVertex = (GLfloat,GLfloat,GLfloat)
>> toVertex :: GLVertex -> Vertex3 GLfloat
>> toVertex :: (a,a,a) -> Vertex3 a
> Yes this works (the first variant). Thanks ! But I must say that I
> have problems to understand
The problem is that you tried to tell the compiler that toVertex would
return a parametrised type, namely 'Vertex3 a', but that the compiler
sees that toVertex, when given a 'GLVertex' always will produce
'Vertex3 GLfloat'.
> the class mechanism in its full extend....
Classes doesn't have anything to do with this.
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Glasgow-haskell-users
mailing list