[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / reader / read002.stderr
1 Parsed, Haskellised:
2 module Main where
3 import Prelude {-
4            interface Prelude where
5                import PreludeBuiltin ( trace, Char )
6                import PreludeCore ( Bool, String, ReadS, ShowS, Text )
7                import PreludeRatio (
8                    %, numerator, denominator, approxRational )
9                import PreludeComplex (
10                    realPart,
11                    imagPart,
12                    conjugate,
13                    mkPolar,
14                    cis,
15                    polar,
16                    magnitude,
17                    phase )
18                import PreludeList (
19                    head,
20                    last,
21                    tail,
22                    init,
23                    null,
24                    \\,
25                    genericLength,
26                    length,
27                    !!,
28                    filter,
29                    partition,
30                    foldl1,
31                    scanl,
32                    scanl1,
33                    foldr1,
34                    scanr,
35                    scanr1,
36                    iterate,
37                    repeat,
38                    cycle,
39                    take,
40                    drop,
41                    splitAt,
42                    takeWhile,
43                    dropWhile,
44                    span,
45                    break,
46                    lines,
47                    words,
48                    unlines,
49                    unwords,
50                    nub,
51                    reverse,
52                    and,
53                    or,
54                    any,
55                    all,
56                    elem,
57                    notElem,
58                    sum,
59                    product,
60                    sums,
61                    products,
62                    maximum,
63                    minimum,
64                    concat,
65                    transpose,
66                    zip,
67                    zip3,
68                    zip4,
69                    zip5,
70                    zip6,
71                    zip7,
72                    zipWith,
73                    zipWith3,
74                    zipWith4,
75                    zipWith5,
76                    zipWith6,
77                    zipWith7,
78                    unzip,
79                    unzip3,
80                    unzip4,
81                    unzip5,
82                    unzip6,
83                    unzip7 )
84                import PreludeArray (
85                    array,
86                    listArray,
87                    !,
88                    bounds,
89                    indices,
90                    elems,
91                    assocs,
92                    accumArray,
93                    //,
94                    accum,
95                    amap,
96                    ixmap )
97                import PreludeText (
98                    reads,
99                    shows,
100                    show,
101                    read,
102                    showChar,
103                    readLitChar,
104                    showLitChar,
105                    readSigned,
106                    showSigned,
107                    readDec,
108                    showInt,
109                    readFloat,
110                    showFloat )
111                import PreludeIO (
112                    stdin,
113                    stdout,
114                    stderr,
115                    stdecho,
116                    done,
117                    readFile,
118                    writeFile,
119                    appendFile,
120                    readBinFile,
121                    writeBinFile,
122                    appendBinFile,
123                    deleteFile,
124                    statusFile,
125                    readChan,
126                    appendChan,
127                    readBinChan,
128                    appendBinChan,
129                    statusChan,
130                    echo,
131                    getArgs,
132                    getProgName,
133                    getEnv,
134                    setEnv,
135                    abort,
136                    exit,
137                    print,
138                    prints,
139                    interact )
140                instance (Eq a, Eq b) => Eq (a, b)
141                instance (Ord a, Ord b) => Ord (a, b)
142                instance (Ix a, Ix b) => Ix (a, b)
143                instance (Text a, Text b) => Text (a, b)
144                instance (Binary a, Binary b) => Binary (a, b)
145                instance (Eq a, Eq b, Eq c) => Eq (a, b, c)
146                instance (Ord a, Ord b, Ord c) => Ord (a, b, c)
147                instance (Ix a, Ix b, Ix c) => Ix (a, b, c)
148                instance (Text a, Text b, Text c) => Text (a, b, c)
149                instance (Binary a, Binary b, Binary c) => Binary (a, b, c)
150                instance (Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d)
151                instance (Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d)
152                instance (Ix a, Ix b, Ix c, Ix d) => Ix (a, b, c, d)
153                instance (Text a, Text b, Text c, Text d) => Text (a, b, c, d)
154                instance (Binary a, Binary b, Binary c, Binary d) => Binary (a,
155                                                                             b,
156                                                                             c,
157                                                                             d)
158                ^ :: (Num b, Integral a) => b -> a -> b
159                ^^ :: (Fractional b, Integral a) => b -> a -> b
160                appendBin :: Bin -> Bin -> Bin
161                asTypeOf :: a -> a -> a
162                atan2 :: RealFloat a => a -> a -> a
163                chr :: Int -> Char
164                fromIntegral :: (Integral a, Num b) => a -> b
165                fromRealFrac :: (RealFrac a, Fractional b) => a -> b
166                gcd :: Integral a => a -> a -> a
167                isAlpha :: Char -> Bool
168                isAlphanum :: Char -> Bool
169                isAscii :: Char -> Bool
170                isControl :: Char -> Bool
171                isDigit :: Char -> Bool
172                isLower :: Char -> Bool
173                isNullBin :: Bin -> Bool
174                isPrint :: Char -> Bool
175                isSpace :: Char -> Bool
176                isUpper :: Char -> Bool
177                lcm :: Integral a => a -> a -> a
178                maxChar :: Char
179                maxInt :: Int
180                minChar :: Char
181                minInt :: Int
182                nullBin :: Bin
183                ord :: Char -> Int
184                subtract :: Num a => a -> a -> a
185                toLower :: Char -> Char
186                toUpper :: Char -> Char
187                until :: (a -> Bool) -> (a -> a) -> a -> a
188                trace :: String -> a -> a
189                % :: Integral a => a -> a -> Ratio a
190                numerator :: Integral a => Ratio a -> a
191                denominator :: Integral a => Ratio a -> a
192                approxRational :: RealFrac a => a -> a -> Rational
193                cis :: RealFloat a => a -> Complex a
194                conjugate :: RealFloat a => Complex a -> Complex a
195                imagPart :: RealFloat a => Complex a -> a
196                magnitude :: RealFloat a => Complex a -> a
197                mkPolar :: RealFloat a => a -> a -> Complex a
198                phase :: RealFloat a => Complex a -> a
199                polar :: RealFloat a => Complex a -> (a, a)
200                realPart :: RealFloat a => Complex a -> a
201                !! :: Integral a => [b] -> a -> b
202                \\ :: Eq a => [a] -> [a] -> [a]
203                all :: (a -> Bool) -> [a] -> Bool
204                and :: [Bool] -> Bool
205                any :: (a -> Bool) -> [a] -> Bool
206                break :: (a -> Bool) -> [a] -> ([a], [a])
207                concat :: [[a]] -> [a]
208                cycle :: [a] -> [a]
209                drop :: Integral a => a -> [b] -> [b]
210                dropWhile :: (a -> Bool) -> [a] -> [a]
211                elem :: Eq a => a -> [a] -> Bool
212                filter :: (a -> Bool) -> [a] -> [a]
213                foldl1 :: (a -> a -> a) -> [a] -> a
214                foldr1 :: (a -> a -> a) -> [a] -> a
215                genericLength :: Num b => [a] -> b
216                head :: [a] -> a
217                init :: [a] -> [a]
218                iterate :: (a -> a) -> a -> [a]
219                last :: [a] -> a
220                length :: [a] -> Int
221                lines :: [Char] -> [[Char]]
222                maximum :: Ord a => [a] -> a
223                minimum :: Ord a => [a] -> a
224                notElem :: Eq a => a -> [a] -> Bool
225                nub :: Eq a => [a] -> [a]
226                null :: [a] -> Bool
227                or :: [Bool] -> Bool
228                partition :: (a -> Bool) -> [a] -> ([a], [a])
229                product :: Num a => [a] -> a
230                products :: Num a => [a] -> [a]
231                repeat :: a -> [a]
232                reverse :: [a] -> [a]
233                scanl :: (b -> a -> b) -> b -> [a] -> [b]
234                scanl1 :: (a -> a -> a) -> [a] -> [a]
235                scanr :: (a -> b -> b) -> b -> [a] -> [b]
236                scanr1 :: (a -> a -> a) -> [a] -> [a]
237                span :: (a -> Bool) -> [a] -> ([a], [a])
238                splitAt :: Integral a => a -> [b] -> ([b], [b])
239                sum :: Num a => [a] -> a
240                sums :: Num a => [a] -> [a]
241                tail :: [a] -> [a]
242                take :: Integral a => a -> [b] -> [b]
243                takeWhile :: (a -> Bool) -> [a] -> [a]
244                transpose :: [[a]] -> [[a]]
245                unlines :: [[Char]] -> [Char]
246                unwords :: [[Char]] -> [Char]
247                unzip :: [(a, b)] -> ([a], [b])
248                unzip3 :: [(a, b, c)] -> ([a], [b], [c])
249                unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d])
250                unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e])
251                unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f])
252                unzip7 ::
253                    [(a, b, c, d, e, f, g)]
254                    -> ([a], [b], [c], [d], [e], [f], [g])
255                words :: [Char] -> [[Char]]
256                zip :: [a] -> [b] -> [(a, b)]
257                zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
258                zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)]
259                zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)]
260                zip6 ::
261                    [a]
262                    -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)]
263                zip7 ::
264                    [a]
265                    -> [b]
266                       -> [c]
267                          -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)]
268                zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
269                zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
270                zipWith4 ::
271                    (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
272                zipWith5 ::
273                    (a -> b -> c -> d -> e -> f)
274                    -> [a] -> [b] -> [c] -> [d] -> [e] -> [f]
275                zipWith6 ::
276                    (a -> b -> c -> d -> e -> f -> g)
277                    -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]
278                zipWith7 ::
279                    (a -> b -> c -> d -> e -> f -> g -> h)
280                    -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
281                ! :: Ix a => Array a b -> a -> b
282                // :: Ix a => Array a b -> [Assoc a b] -> Array a b
283                accum ::
284                    Ix b => (c -> a -> c)
285                            -> Array b c -> [Assoc b a] -> Array b c
286                accumArray ::
287                    Ix b => (c -> a -> c)
288                            -> c -> (b, b) -> [Assoc b a] -> Array b c
289                amap :: Ix b => (a -> c) -> Array b a -> Array b c
290                array :: Ix a => (a, a) -> [Assoc a b] -> Array a b
291                assocs :: Ix a => Array a b -> [Assoc a b]
292                bounds :: Ix b => Array b a -> (b, b)
293                elems :: Ix a => Array a b -> [b]
294                indices :: Ix b => Array b a -> [b]
295                ixmap ::
296                    (Ix b, Ix a) => (b, b) -> (b -> a) -> Array a c -> Array b c
297                listArray :: Ix a => (a, a) -> [b] -> Array a b
298                read :: Text a => [Char] -> a
299                readDec :: Integral a => [Char] -> [(a, [Char])]
300                readFloat :: RealFloat a => [Char] -> [(a, [Char])]
301                readLitChar :: [Char] -> [(Char, [Char])]
302                readSigned ::
303                    Real a => ([Char] -> [(a, [Char])])
304                              -> [Char] -> [(a, [Char])]
305                reads :: Text a => [Char] -> [(a, [Char])]
306                show :: Text a => a -> [Char]
307                showChar :: Char -> [Char] -> [Char]
308                showFloat :: RealFloat a => a -> [Char] -> [Char]
309                showInt :: Integral a => a -> [Char] -> [Char]
310                showLitChar :: Char -> [Char] -> [Char]
311                showSigned ::
312                    Real a => (a -> [Char] -> [Char])
313                              -> Int -> a -> [Char] -> [Char]
314                shows :: Text a => a -> [Char] -> [Char]
315                abort :: IOError -> [Response] -> [Request]
316                appendBinChan ::
317                    [Char]
318                    -> Bin
319                       -> (IOError -> [Response] -> [Request])
320                          -> ([Response] -> [Request]) -> [Response] -> [Request]
321                appendBinFile ::
322                    [Char]
323                    -> Bin
324                       -> (IOError -> [Response] -> [Request])
325                          -> ([Response] -> [Request]) -> [Response] -> [Request]
326                appendChan ::
327                    [Char]
328                    -> [Char]
329                       -> (IOError -> [Response] -> [Request])
330                          -> ([Response] -> [Request]) -> [Response] -> [Request]
331                appendFile ::
332                    [Char]
333                    -> [Char]
334                       -> (IOError -> [Response] -> [Request])
335                          -> ([Response] -> [Request]) -> [Response] -> [Request]
336                binDispatch ::
337                    (IOError -> [Response] -> a)
338                    -> (Bin -> [Response] -> a) -> [Response] -> a
339                deleteFile ::
340                    [Char]
341                    -> (IOError -> [Response] -> [Request])
342                       -> ([Response] -> [Request]) -> [Response] -> [Request]
343                done :: [Response] -> [Request]
344                echo ::
345                    Bool
346                    -> (IOError -> [Response] -> [Request])
347                       -> ([Response] -> [Request]) -> [Response] -> [Request]
348                exit :: IOError -> [Response] -> [Request]
349                getArgs ::
350                    (IOError -> [Response] -> [Request])
351                    -> ([[Char]] -> [Response] -> [Request])
352                       -> [Response] -> [Request]
353                getEnv ::
354                    [Char]
355                    -> (IOError -> [Response] -> [Request])
356                       -> ([Char] -> [Response] -> [Request])
357                          -> [Response] -> [Request]
358                getProgName ::
359                    (IOError -> [Response] -> [Request])
360                    -> ([Char] -> [Response] -> [Request])
361                       -> [Response] -> [Request]
362                interact :: ([Char] -> [Char]) -> [Response] -> [Request]
363                print :: Text a => a -> [Response] -> [Request]
364                prints :: Text a => a -> [Char] -> [Response] -> [Request]
365                readBinChan ::
366                    [Char]
367                    -> (IOError -> [Response] -> [Request])
368                       -> (Bin -> [Response] -> [Request])
369                          -> [Response] -> [Request]
370                readBinFile ::
371                    [Char]
372                    -> (IOError -> [Response] -> [Request])
373                       -> (Bin -> [Response] -> [Request])
374                          -> [Response] -> [Request]
375                readChan ::
376                    [Char]
377                    -> (IOError -> [Response] -> [Request])
378                       -> ([Char] -> [Response] -> [Request])
379                          -> [Response] -> [Request]
380                readFile ::
381                    [Char]
382                    -> (IOError -> [Response] -> [Request])
383                       -> ([Char] -> [Response] -> [Request])
384                          -> [Response] -> [Request]
385                setEnv ::
386                    [Char]
387                    -> [Char]
388                       -> (IOError -> [Response] -> [Request])
389                          -> ([Response] -> [Request]) -> [Response] -> [Request]
390                statusChan ::
391                    [Char]
392                    -> (IOError -> [Response] -> [Request])
393                       -> ([Char] -> [Response] -> [Request])
394                          -> [Response] -> [Request]
395                statusFile ::
396                    [Char]
397                    -> (IOError -> [Response] -> [Request])
398                       -> ([Char] -> [Response] -> [Request])
399                          -> [Response] -> [Request]
400                stdecho :: [Char]
401                stderr :: [Char]
402                stdin :: [Char]
403                stdout :: [Char]
404                strDispatch ::
405                    (IOError -> [Response] -> a)
406                    -> ([Char] -> [Response] -> a) -> [Response] -> a
407                strListDispatch ::
408                    (IOError -> [Response] -> a)
409                    -> ([[Char]] -> [Response] -> a) -> [Response] -> a
410                succDispatch ::
411                    (IOError -> [Response] -> a)
412                    -> ([Response] -> a) -> [Response] -> a
413                writeBinFile ::
414                    [Char]
415                    -> Bin
416                       -> (IOError -> [Response] -> [Request])
417                          -> ([Response] -> [Request]) -> [Response] -> [Request]
418                writeFile ::
419                    [Char]
420                    -> [Char]
421                       -> (IOError -> [Response] -> [Request])
422                          -> ([Response] -> [Request]) -> [Response] -> [Request]
423            -}
424 infixr 9 .
425 infixr 8 ^
426 infixr 8 ^^
427 infixr 3 &&
428 infixr 2 ||
429 infixr 0 $
430 infixl 9 !
431 infixl 9 //
432 infix  1 :=
433 infix  6 :+
434 infixr 8 **
435 infixl 7 *
436 infixl 7 /
437 infixl 7 `quot`
438 infixl 7 `rem`
439 infixl 7 `div`
440 infixl 7 `mod`
441 infixl 6 +
442 infixl 6 -
443 infix  4 ==
444 infix  4 /=
445 infix  4 <
446 infix  4 <=
447 infix  4 >=
448 infix  4 >
449 infixl 9 !!
450 infix  5 \\
451 infix  4 `elem`
452 infix  4 `notElem`
453 infixl 7 %
454 infixl 1 `f`
455 infixr 2 \\\
456 infix  3 :==>
457 infix  4 `MkFoo`
458 data Foo
459     = MkFoo Int
460     | (:==>) Float Double
461 \\\ :: Eq a => [a] -> [a] -> [a]
462 {- rec -}
463 f x y = x
464 (\\\)
465     xs ys = xs
466