5db5463bfaecdd8e94ab0ecc91a25ad0637bf77a
[ghc-hetmet.git] / ghc / tests / ghci / ghci008.stdout
1    ___         ___ _
2   / _ \ /\  /\/ __(_)
3  / /_\// /_/ / /  | |      GHC Interactive, version 5.03, for Haskell 98.
4 / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
5 \____/\/ /_/\____/|_|      Type :? for help.
6
7 Loading package std ... linking ... done.
8 Prelude> -- testing :info
9 Prelude> :info +
10 -- + is a method in class Num
11 infixl 6 +
12 (+) :: forall a. (Num a) => a -> a -> a
13 Prelude> :info (+)
14 -- + is a method in class Num
15 infixl 6 +
16 (+) :: forall a. (Num a) => a -> a -> a
17 Prelude> :info Complex.:+
18 -- Complex.:+ is a data constructor
19 infix 6 Complex.:+
20 (Complex.:+) :: forall a. (RealFloat a) =>
21                 a -> a -> Complex.Complex a
22 Prelude> :info (Complex.:+)
23 -- Complex.:+ is a data constructor
24 infix 6 Complex.:+
25 (Complex.:+) :: forall a. (RealFloat a) =>
26                 a -> a -> Complex.Complex a
27 Prelude> :info RealFloat
28 -- RealFloat is a class
29 class (RealFrac a, Floating a) => RealFloat a where {
30     floatRadix :: a -> Integer;
31     floatDigits :: a -> Int;
32     floatRange :: a -> (Int, Int);
33     decodeFloat :: a -> (Integer, Int);
34     encodeFloat :: Integer -> Int -> a;
35     exponent :: a -> Int {- has default method -};
36     significand :: a -> a {- has default method -};
37     scaleFloat :: Int -> a -> a {- has default method -};
38     isInfinite :: a -> Bool;
39     isDenormalized :: a -> Bool;
40     isNegativeZero :: a -> Bool;
41     isIEEE :: a -> Bool;
42     isNaN :: a -> Bool;
43     atan2 :: a -> a -> a {- has default method -};
44     }
45 Prelude> :info []
46 -- [] is a data constructor
47 [] :: forall a. [a]
48
49 -- [] is a type constructor
50 data [] a = [] | (:) a [a]
51 Prelude> :info ()
52 -- () is a data constructor
53 () :: ()
54
55 -- () is a type constructor
56 data () = ()
57 Prelude> :info (,)
58 -- (,) is a data constructor
59 (,) :: forall a b. a -> b -> (a, b)
60
61 -- (,) is a type constructor
62 data (,) a b = (,) a b
63 Prelude> :info `List.isPrefixOf`
64 -- List.isPrefixOf is a variable
65 List.isPrefixOf :: forall a. (Eq a) => [a] -> [a] -> Bool
66 Prelude> Leaving GHCi.