[project @ 2000-05-16 14:03:14 by rrt]
[ghc-hetmet.git] / ghc / tests / reader / should_fail / read001.stdout
1
2 ==================== Parser ====================
3 module OneOfEverything (
4         module OneOfEverything, module OneC, OrdClass(orda, ordb),
5         EqClass(..), EqTree(EqLeaf, EqBranch), FooDataC(..), FooDataB(..),
6         FooData, fixn
7     ) where
8 import Prelude
9 import IO (putStr)
10 import System hiding (getArgs)
11 import Monad
12 bindwith ::
13     {- implicit forall -} (OrdClass a, OrdClass b) => a -> b -> b
14 g ::
15     {- implicit forall -}
16     (Num a, Eq b) =>
17     Foo a -> [b] -> (a, a, a) -> b
18 g x y z = head y
19 f _
20   x
21   1
22   1.93
23   'c'
24   "dog"
25   ~y
26   (z@(Foo a b))
27   (c Bar d)
28   [1, 2]
29   (3, 4)
30   ((n+42))
31     = y
32 expr a b c d
33        = ((((((((a + (: a b)) + (a : b)) + (((1 - 'c') - "abc") - 1.293))
34               + ((\ x y z -> x) 42))
35              + ((9 *)))
36             + ((* 8)))
37            + (case x of
38                 Prelude.[]
39                   | null x -> 99
40                   | otherwise -> 98
41                   | True -> 97
42                   where
43                       null x = False))
44           + ([z | z <- c, isSpace z]))
45          + (let y = foo
46             in
47               (((((((y + [1, 2, 3, 4]) + (4, 3, 2, 1))
48                    + (4 :: {- implicit forall -} (Num a) => a))
49                   + (if 42 == 42.0 then 1 else 4))
50                  + ([1 .. ]))
51                 + ([2, 4 .. ]))
52                + ([3 .. 5]))
53               + ([4, 8 .. 999]))
54 mat a b c d
55       | foof a b = d
56       | foof a c = d
57       | foof b c = d
58       where
59           foof a b = a == b
60 (~(a, b, c))
61     | nullity b = a
62     | nullity c = a
63     | otherwise = a
64     where
65         nullity = null
66 recb a = reca a
67 reca a = recb a
68 bindwith a b = b
69 singlebind x = x
70 fixr x y = x
71 fixl x y = x
72 fixn x y = x
73 infix 6 fixn
74 infixl 7 +#
75 infixr 8 fixr
76 type Pair a b = {- implicit forall -} (a, b)
77 data FooData = forall. FooCon Int
78 data FooDataB = forall. FooConB Double
79 data (Eq a) => EqTree a =
80     forall. EqLeaf a | forall. EqBranch (EqLeaf a) (EqLeaf a)
81 class (Eq a) => EqClass a where {
82     eqc :: {- implicit forall -} a -> Char;
83     eqc x = '?'
84     }
85 class (Ord a) => OrdClass a where {
86     orda :: {- implicit forall -} a -> Char;
87     ordb :: {- implicit forall -} a -> Char;
88     ordc :: {- implicit forall -} a -> Char;
89     }
90 instance {- implicit forall -} (Eq a) => EqClass (EqTree a) where
91     []
92     eqc x = 'a'
93 default (Rational, Integer)
94
95