import Prelude
-#ifndef __NHC__
import Data.Typeable
-#endif
+import Data.Generics.Basics( Data )
#ifdef __HUGS__
import Hugs.Prelude(Num(fromInt), Fractional(fromDouble))
data (RealFloat a) => Complex a
= !a :+ !a -- ^ forms a complex number from its real and imaginary
-- rectangular components.
- deriving (Eq, Read, Show)
+# if __GLASGOW_HASKELL__
+ deriving (Eq, Show, Read, Data)
+# else
+ deriving (Eq, Show, Read)
+# endif
-- -----------------------------------------------------------------------------
-- Functions over Complex
-- -----------------------------------------------------------------------------
-- Instances of Complex
-#ifndef __NHC__
#include "Typeable.h"
INSTANCE_TYPEABLE1(Complex,complexTc,"Complex")
-#endif
instance (RealFloat a) => Num (Complex a) where
{-# SPECIALISE instance Num (Complex Float) #-}