[EMAIL PROTECTED] writes:
> On Tue, Feb 01, 2005 at 08:57:46AM -0000, Simon Peyton-Jones wrote:
> >
> > I think that neither Hugs nor NHC grok the Data class, so we can use
> > 'deriving( Data )' freely (surrounded with #ifdef __GLASGOW_HASKELL__,
> > of course). Is that right?
>
> So this sort of thing should be fine with Hugs and (I think) Nhc98:
>
> import Data.Typeable
> #ifdef __GLASGOW_HASKELL__
> import Data.Generics.Basics
> import Data.Generics.Instances
> #else
> #include "Typeable.h"
> #endif
>
> ...
>
> data Set a = Tip
> | Bin {-# UNPACK #-} !Size a !(Set a) !(Set a)
> #ifdef __GLASGOW_HASKELL__
> deriving (Typeable, Data)
> #else
> INSTANCE_TYPEABLE1(Set,setTc,"Set")
> #endif
Yes, I think that is right for nhc98 too.
Regards,
Malcolm
_______________________________________________
Cvs-libraries mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-libraries