X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FComplex.hs;h=369250149267dddf662073c0b77fdedea3ef62b2;hb=HEAD;hp=9765edafa018d16084db245cbc262adc6c5bafc5;hpb=41e8fba828acbae1751628af50849f5352b27873;p=ghc-base.git diff --git a/Data/Complex.hs b/Data/Complex.hs index 9765eda..3692501 100644 --- a/Data/Complex.hs +++ b/Data/Complex.hs @@ -1,4 +1,7 @@ {-# LANGUAGE CPP, DeriveDataTypeable #-} +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE StandaloneDeriving #-} +#endif ----------------------------------------------------------------------------- -- | @@ -64,7 +67,7 @@ infix 6 :+ -- For a complex number @z@, @'abs' z@ is a number with the magnitude of @z@, -- but oriented in the positive real direction, whereas @'signum' z@ -- has the phase of @z@, but unit magnitude. -data (RealFloat a) => Complex a +data Complex a = !a :+ !a -- ^ forms a complex number from its real and imaginary -- rectangular components. # if __GLASGOW_HASKELL__