projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add deriving Data to Complex
[ghc-base.git]
/
Data
/
Complex.hs
diff --git
a/Data/Complex.hs
b/Data/Complex.hs
index
749ba91
..
263b052
100644
(file)
--- a/
Data/Complex.hs
+++ b/
Data/Complex.hs
@@
-44,6
+44,7
@@
module Data.Complex
import Prelude
import Data.Typeable
import Prelude
import Data.Typeable
+import Data.Generics.Basics( Data )
#ifdef __HUGS__
import Hugs.Prelude(Num(fromInt), Fractional(fromDouble))
#ifdef __HUGS__
import Hugs.Prelude(Num(fromInt), Fractional(fromDouble))
@@
-62,7
+63,11
@@
infix 6 :+
data (RealFloat a) => Complex a
= !a :+ !a -- ^ forms a complex number from its real and imaginary
-- rectangular components.
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
-- -----------------------------------------------------------------------------
-- Functions over Complex