X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FComplex.hs;h=9ea8a413c58c139bd41a41a4c9ff8082bea04dee;hb=eb87007595377966ab5544f6e204e58a49deb3a9;hp=6ebbfcbaeb8ae33e105c5bf5d240360519c6ae88;hpb=9875b3cf1ada084cfa3e6c516b11e946f1d6234e;p=ghc-base.git diff --git a/Data/Complex.hs b/Data/Complex.hs index 6ebbfcb..9ea8a41 100644 --- a/Data/Complex.hs +++ b/Data/Complex.hs @@ -1,3 +1,8 @@ +{-# LANGUAGE CPP, DeriveDataTypeable #-} +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE StandaloneDeriving #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : Data.Complex @@ -65,7 +70,11 @@ infix 6 :+ data (RealFloat a) => Complex a = !a :+ !a -- ^ forms a complex number from its real and imaginary -- rectangular components. +# if __GLASGOW_HASKELL__ + deriving (Eq, Show, Read, Data) +# else deriving (Eq, Show, Read) +# endif -- ----------------------------------------------------------------------------- -- Functions over Complex @@ -194,4 +203,4 @@ instance (RealFloat a) => Floating (Complex a) where asinh z = log (z + sqrt (1+z*z)) acosh z = log (z + (z+1) * sqrt ((z-1)/(z+1))) - atanh z = log ((1+z) / sqrt (1-z*z)) + atanh z = 0.5 * log ((1.0+z) / (1.0-z))