| > Maybe I'm totally missing the point, but what about that:
| >
| > \begin{code}
| > instance Marshalable a => Marshalable (Vec3 a) where
| > indexOffAddr buf off = do
| > let sizeOfPolymorphicA = sizeOf (undefined::a)
| > ...
| > \end{code}
| > [...]
|
| That's of course exactly what one wants to write, but AFAIK this is
| not Haskell 98, so I wanted to avoid it. Or is it Haskell 98? %-}
It's not H98, but you could instead write
instance Marshalable a => Marshalable (Vec3 a) where
indexOffAddr buf off = do
let sizeOfPolymorphicA = sizeOf (indexOffAddr buf 0)
...
Pretty wierd, but it should work.
Simon