d78b78a23eb66c8f61f409fe291c6a37beb88d28
[haskell-report.git] / report / lib-hdrs / Complex.hs
1 module Complex (
2 Complex((:+)), realPart, imagPart, conjugate,
3 mkPolar, cis, polar, magnitude, phase ) where
4
5 infix 6 :+
6
7 data (RealFloat a) => Complex a = !a :+ !a
8
9 realPart, imagPart :: (RealFloat a) => Complex a -> a
10 conjugate :: (RealFloat a) => Complex a -> Complex a
11 mkPolar :: (RealFloat a) => a -> a -> Complex a
12 cis :: (RealFloat a) => a -> Complex a
13 polar :: (RealFloat a) => Complex a -> (a,a)
14 magnitude, phase :: (RealFloat a) => Complex a -> a
15
16 instance (RealFloat a) => Eq (Complex a) where ...
17 instance (RealFloat a) => Read (Complex a) where ...
18 instance (RealFloat a) => Show (Complex a) where ...
19 instance (RealFloat a) => Num (Complex a) where ...
20 instance (RealFloat a) => Fractional (Complex a) where ...
21 instance (RealFloat a) => Floating (Complex a) where ...