In a private EMail Michael Weber wrote:
> On Fri, Oct 08, 1999 at 13:57:14 +0200, Sven Panne wrote:
> > [...]
> > data Vec3 a = Vec3 a a a
> >
> > instance Marshalable a => Marshalable (Vec3 a) where
> >    sizeOf    (Vec3 x _ _) = 3 * sizeOf x
> > [...]
> 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?   %-}

Cheers,
   Sven
-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.informatik.uni-muenchen.de/~Sven.Panne

Reply via email to