But neither of you need or want Data instances, right?

S

| -----Original Message-----
| From: Malcolm Wallace [mailto:[EMAIL PROTECTED]
| Sent: 01 February 2005 11:20
| Cc: [EMAIL PROTECTED]; Simon Peyton-Jones;
[EMAIL PROTECTED]; [EMAIL PROTECTED]
| Subject: Re: cvs commit: fptools/libraries/base/Data Array.hs
FiniteMap.hs IntMap.hs IntSet.hs
| Map.hs Set.hs Typeable.hs fptools/libraries/base/Data/Generics
Instances.hs
| fptools/libraries/base/GHC Conc.lhs ForeignPtr.hs
| 
| [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

Reply via email to