[project @ 1997-07-31 01:46:24 by sof]
[ghc-hetmet.git] / ghc / compiler / tests / reader / read002.stderr
index f8a8600..aeb88ae 100644 (file)
-Parsed, Haskellised:
-module Main where
-import Prelude {-
-          interface Prelude where
-              import PreludeBuiltin ( trace, Char )
-              import PreludeCore ( Bool, String, ReadS, ShowS, Text )
-              import PreludeRatio (
-                  %, numerator, denominator, approxRational )
-              import PreludeComplex (
-                  realPart,
-                  imagPart,
-                  conjugate,
-                  mkPolar,
-                  cis,
-                  polar,
-                  magnitude,
-                  phase )
-              import PreludeList (
-                  head,
-                  last,
-                  tail,
-                  init,
-                  null,
-                  \\,
-                  genericLength,
-                  length,
-                  !!,
-                  filter,
-                  partition,
-                  foldl1,
-                  scanl,
-                  scanl1,
-                  foldr1,
-                  scanr,
-                  scanr1,
-                  iterate,
-                  repeat,
-                  cycle,
-                  take,
-                  drop,
-                  splitAt,
-                  takeWhile,
-                  dropWhile,
-                  span,
-                  break,
-                  lines,
-                  words,
-                  unlines,
-                  unwords,
-                  nub,
-                  reverse,
-                  and,
-                  or,
-                  any,
-                  all,
-                  elem,
-                  notElem,
-                  sum,
-                  product,
-                  sums,
-                  products,
-                  maximum,
-                  minimum,
-                  concat,
-                  transpose,
-                  zip,
-                  zip3,
-                  zip4,
-                  zip5,
-                  zip6,
-                  zip7,
-                  zipWith,
-                  zipWith3,
-                  zipWith4,
-                  zipWith5,
-                  zipWith6,
-                  zipWith7,
-                  unzip,
-                  unzip3,
-                  unzip4,
-                  unzip5,
-                  unzip6,
-                  unzip7 )
-              import PreludeArray (
-                  array,
-                  listArray,
-                  !,
-                  bounds,
-                  indices,
-                  elems,
-                  assocs,
-                  accumArray,
-                  //,
-                  accum,
-                  amap,
-                  ixmap )
-              import PreludeText (
-                  reads,
-                  shows,
-                  show,
-                  read,
-                  showChar,
-                  readLitChar,
-                  showLitChar,
-                  readSigned,
-                  showSigned,
-                  readDec,
-                  showInt,
-                  readFloat,
-                  showFloat )
-              import PreludeIO (
-                  stdin,
-                  stdout,
-                  stderr,
-                  stdecho,
-                  done,
-                  readFile,
-                  writeFile,
-                  appendFile,
-                  readBinFile,
-                  writeBinFile,
-                  appendBinFile,
-                  deleteFile,
-                  statusFile,
-                  readChan,
-                  appendChan,
-                  readBinChan,
-                  appendBinChan,
-                  statusChan,
-                  echo,
-                  getArgs,
-                  getProgName,
-                  getEnv,
-                  setEnv,
-                  abort,
-                  exit,
-                  print,
-                  prints,
-                  interact )
-              instance (Eq a, Eq b) => Eq (a, b)
-              instance (Ord a, Ord b) => Ord (a, b)
-              instance (Ix a, Ix b) => Ix (a, b)
-              instance (Text a, Text b) => Text (a, b)
-              instance (Binary a, Binary b) => Binary (a, b)
-              instance (Eq a, Eq b, Eq c) => Eq (a, b, c)
-              instance (Ord a, Ord b, Ord c) => Ord (a, b, c)
-              instance (Ix a, Ix b, Ix c) => Ix (a, b, c)
-              instance (Text a, Text b, Text c) => Text (a, b, c)
-              instance (Binary a, Binary b, Binary c) => Binary (a, b, c)
-              instance (Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d)
-              instance (Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d)
-              instance (Ix a, Ix b, Ix c, Ix d) => Ix (a, b, c, d)
-              instance (Text a, Text b, Text c, Text d) => Text (a, b, c, d)
-              instance (Binary a, Binary b, Binary c, Binary d) => Binary (a,
-                                                                           b,
-                                                                           c,
-                                                                           d)
-              ^ :: (Num b, Integral a) => b -> a -> b
-              ^^ :: (Fractional b, Integral a) => b -> a -> b
-              appendBin :: Bin -> Bin -> Bin
-              asTypeOf :: a -> a -> a
-              atan2 :: RealFloat a => a -> a -> a
-              chr :: Int -> Char
-              fromIntegral :: (Integral a, Num b) => a -> b
-              fromRealFrac :: (RealFrac a, Fractional b) => a -> b
-              gcd :: Integral a => a -> a -> a
-              isAlpha :: Char -> Bool
-              isAlphanum :: Char -> Bool
-              isAscii :: Char -> Bool
-              isControl :: Char -> Bool
-              isDigit :: Char -> Bool
-              isLower :: Char -> Bool
-              isNullBin :: Bin -> Bool
-              isPrint :: Char -> Bool
-              isSpace :: Char -> Bool
-              isUpper :: Char -> Bool
-              lcm :: Integral a => a -> a -> a
-              maxChar :: Char
-              maxInt :: Int
-              minChar :: Char
-              minInt :: Int
-              nullBin :: Bin
-              ord :: Char -> Int
-              subtract :: Num a => a -> a -> a
-              toLower :: Char -> Char
-              toUpper :: Char -> Char
-              until :: (a -> Bool) -> (a -> a) -> a -> a
-              trace :: String -> a -> a
-              % :: Integral a => a -> a -> Ratio a
-              numerator :: Integral a => Ratio a -> a
-              denominator :: Integral a => Ratio a -> a
-              approxRational :: RealFrac a => a -> a -> Rational
-              cis :: RealFloat a => a -> Complex a
-              conjugate :: RealFloat a => Complex a -> Complex a
-              imagPart :: RealFloat a => Complex a -> a
-              magnitude :: RealFloat a => Complex a -> a
-              mkPolar :: RealFloat a => a -> a -> Complex a
-              phase :: RealFloat a => Complex a -> a
-              polar :: RealFloat a => Complex a -> (a, a)
-              realPart :: RealFloat a => Complex a -> a
-              !! :: Integral a => [b] -> a -> b
-              \\ :: Eq a => [a] -> [a] -> [a]
-              all :: (a -> Bool) -> [a] -> Bool
-              and :: [Bool] -> Bool
-              any :: (a -> Bool) -> [a] -> Bool
-              break :: (a -> Bool) -> [a] -> ([a], [a])
-              concat :: [[a]] -> [a]
-              cycle :: [a] -> [a]
-              drop :: Integral a => a -> [b] -> [b]
-              dropWhile :: (a -> Bool) -> [a] -> [a]
-              elem :: Eq a => a -> [a] -> Bool
-              filter :: (a -> Bool) -> [a] -> [a]
-              foldl1 :: (a -> a -> a) -> [a] -> a
-              foldr1 :: (a -> a -> a) -> [a] -> a
-              genericLength :: Num b => [a] -> b
-              head :: [a] -> a
-              init :: [a] -> [a]
-              iterate :: (a -> a) -> a -> [a]
-              last :: [a] -> a
-              length :: [a] -> Int
-              lines :: [Char] -> [[Char]]
-              maximum :: Ord a => [a] -> a
-              minimum :: Ord a => [a] -> a
-              notElem :: Eq a => a -> [a] -> Bool
-              nub :: Eq a => [a] -> [a]
-              null :: [a] -> Bool
-              or :: [Bool] -> Bool
-              partition :: (a -> Bool) -> [a] -> ([a], [a])
-              product :: Num a => [a] -> a
-              products :: Num a => [a] -> [a]
-              repeat :: a -> [a]
-              reverse :: [a] -> [a]
-              scanl :: (b -> a -> b) -> b -> [a] -> [b]
-              scanl1 :: (a -> a -> a) -> [a] -> [a]
-              scanr :: (a -> b -> b) -> b -> [a] -> [b]
-              scanr1 :: (a -> a -> a) -> [a] -> [a]
-              span :: (a -> Bool) -> [a] -> ([a], [a])
-              splitAt :: Integral a => a -> [b] -> ([b], [b])
-              sum :: Num a => [a] -> a
-              sums :: Num a => [a] -> [a]
-              tail :: [a] -> [a]
-              take :: Integral a => a -> [b] -> [b]
-              takeWhile :: (a -> Bool) -> [a] -> [a]
-              transpose :: [[a]] -> [[a]]
-              unlines :: [[Char]] -> [Char]
-              unwords :: [[Char]] -> [Char]
-              unzip :: [(a, b)] -> ([a], [b])
-              unzip3 :: [(a, b, c)] -> ([a], [b], [c])
-              unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d])
-              unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e])
-              unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f])
-              unzip7 ::
-                  [(a, b, c, d, e, f, g)]
-                  -> ([a], [b], [c], [d], [e], [f], [g])
-              words :: [Char] -> [[Char]]
-              zip :: [a] -> [b] -> [(a, b)]
-              zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
-              zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)]
-              zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)]
-              zip6 ::
-                  [a]
-                  -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)]
-              zip7 ::
-                  [a]
-                  -> [b]
-                     -> [c]
-                        -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)]
-              zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
-              zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
-              zipWith4 ::
-                  (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
-              zipWith5 ::
-                  (a -> b -> c -> d -> e -> f)
-                  -> [a] -> [b] -> [c] -> [d] -> [e] -> [f]
-              zipWith6 ::
-                  (a -> b -> c -> d -> e -> f -> g)
-                  -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]
-              zipWith7 ::
-                  (a -> b -> c -> d -> e -> f -> g -> h)
-                  -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
-              ! :: Ix a => Array a b -> a -> b
-              // :: Ix a => Array a b -> [Assoc a b] -> Array a b
-              accum ::
-                  Ix b => (c -> a -> c)
-                          -> Array b c -> [Assoc b a] -> Array b c
-              accumArray ::
-                  Ix b => (c -> a -> c)
-                          -> c -> (b, b) -> [Assoc b a] -> Array b c
-              amap :: Ix b => (a -> c) -> Array b a -> Array b c
-              array :: Ix a => (a, a) -> [Assoc a b] -> Array a b
-              assocs :: Ix a => Array a b -> [Assoc a b]
-              bounds :: Ix b => Array b a -> (b, b)
-              elems :: Ix a => Array a b -> [b]
-              indices :: Ix b => Array b a -> [b]
-              ixmap ::
-                  (Ix b, Ix a) => (b, b) -> (b -> a) -> Array a c -> Array b c
-              listArray :: Ix a => (a, a) -> [b] -> Array a b
-              read :: Text a => [Char] -> a
-              readDec :: Integral a => [Char] -> [(a, [Char])]
-              readFloat :: RealFloat a => [Char] -> [(a, [Char])]
-              readLitChar :: [Char] -> [(Char, [Char])]
-              readSigned ::
-                  Real a => ([Char] -> [(a, [Char])])
-                            -> [Char] -> [(a, [Char])]
-              reads :: Text a => [Char] -> [(a, [Char])]
-              show :: Text a => a -> [Char]
-              showChar :: Char -> [Char] -> [Char]
-              showFloat :: RealFloat a => a -> [Char] -> [Char]
-              showInt :: Integral a => a -> [Char] -> [Char]
-              showLitChar :: Char -> [Char] -> [Char]
-              showSigned ::
-                  Real a => (a -> [Char] -> [Char])
-                            -> Int -> a -> [Char] -> [Char]
-              shows :: Text a => a -> [Char] -> [Char]
-              abort :: IOError -> [Response] -> [Request]
-              appendBinChan ::
-                  [Char]
-                  -> Bin
-                     -> (IOError -> [Response] -> [Request])
-                        -> ([Response] -> [Request]) -> [Response] -> [Request]
-              appendBinFile ::
-                  [Char]
-                  -> Bin
-                     -> (IOError -> [Response] -> [Request])
-                        -> ([Response] -> [Request]) -> [Response] -> [Request]
-              appendChan ::
-                  [Char]
-                  -> [Char]
-                     -> (IOError -> [Response] -> [Request])
-                        -> ([Response] -> [Request]) -> [Response] -> [Request]
-              appendFile ::
-                  [Char]
-                  -> [Char]
-                     -> (IOError -> [Response] -> [Request])
-                        -> ([Response] -> [Request]) -> [Response] -> [Request]
-              binDispatch ::
-                  (IOError -> [Response] -> a)
-                  -> (Bin -> [Response] -> a) -> [Response] -> a
-              deleteFile ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> ([Response] -> [Request]) -> [Response] -> [Request]
-              done :: [Response] -> [Request]
-              echo ::
-                  Bool
-                  -> (IOError -> [Response] -> [Request])
-                     -> ([Response] -> [Request]) -> [Response] -> [Request]
-              exit :: IOError -> [Response] -> [Request]
-              getArgs ::
-                  (IOError -> [Response] -> [Request])
-                  -> ([[Char]] -> [Response] -> [Request])
-                     -> [Response] -> [Request]
-              getEnv ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> ([Char] -> [Response] -> [Request])
-                        -> [Response] -> [Request]
-              getProgName ::
-                  (IOError -> [Response] -> [Request])
-                  -> ([Char] -> [Response] -> [Request])
-                     -> [Response] -> [Request]
-              interact :: ([Char] -> [Char]) -> [Response] -> [Request]
-              print :: Text a => a -> [Response] -> [Request]
-              prints :: Text a => a -> [Char] -> [Response] -> [Request]
-              readBinChan ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> (Bin -> [Response] -> [Request])
-                        -> [Response] -> [Request]
-              readBinFile ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> (Bin -> [Response] -> [Request])
-                        -> [Response] -> [Request]
-              readChan ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> ([Char] -> [Response] -> [Request])
-                        -> [Response] -> [Request]
-              readFile ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> ([Char] -> [Response] -> [Request])
-                        -> [Response] -> [Request]
-              setEnv ::
-                  [Char]
-                  -> [Char]
-                     -> (IOError -> [Response] -> [Request])
-                        -> ([Response] -> [Request]) -> [Response] -> [Request]
-              statusChan ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> ([Char] -> [Response] -> [Request])
-                        -> [Response] -> [Request]
-              statusFile ::
-                  [Char]
-                  -> (IOError -> [Response] -> [Request])
-                     -> ([Char] -> [Response] -> [Request])
-                        -> [Response] -> [Request]
-              stdecho :: [Char]
-              stderr :: [Char]
-              stdin :: [Char]
-              stdout :: [Char]
-              strDispatch ::
-                  (IOError -> [Response] -> a)
-                  -> ([Char] -> [Response] -> a) -> [Response] -> a
-              strListDispatch ::
-                  (IOError -> [Response] -> a)
-                  -> ([[Char]] -> [Response] -> a) -> [Response] -> a
-              succDispatch ::
-                  (IOError -> [Response] -> a)
-                  -> ([Response] -> a) -> [Response] -> a
-              writeBinFile ::
-                  [Char]
-                  -> Bin
-                     -> (IOError -> [Response] -> [Request])
-                        -> ([Response] -> [Request]) -> [Response] -> [Request]
-              writeFile ::
-                  [Char]
-                  -> [Char]
-                     -> (IOError -> [Response] -> [Request])
-                        -> ([Response] -> [Request]) -> [Response] -> [Request]
-          -}
-infixr 9 .
-infixr 8 ^
-infixr 8 ^^
-infixr 3 &&
-infixr 2 ||
-infixr 0 $
-infixl 9 !
-infixl 9 //
-infix  1 :=
-infix  6 :+
-infixr 8 **
-infixl 7 *
-infixl 7 /
-infixl 7 `quot`
-infixl 7 `rem`
-infixl 7 `div`
-infixl 7 `mod`
-infixl 6 +
-infixl 6 -
-infix  4 ==
-infix  4 /=
-infix  4 <
-infix  4 <=
-infix  4 >=
-infix  4 >
-infixl 9 !!
-infix  5 \\
-infix  4 `elem`
-infix  4 `notElem`
-infixl 7 %
-infixl 1 `f`
+
+
+================================================================================
+Reader:
+module Reader where
+infixl 1 f
 infixr 2 \\\
-infix  3 :==>
-infix  4 `MkFoo`
-data Foo
-    = MkFoo Int
-    | (:==>) Float Double
-\\\ :: Eq a => [a] -> [a] -> [a]
+infix 3 :==>
+infix 4 MkFoo
 {- rec -}
-f x y = x
-(\\\)
-    xs ys = xs
-
+\\\ ::
+    _forall_ [] {Eq a} => [a] -> [a] -> [a]
+f   x y     =   x
+\\\ xs ys   =   xs
+data Foo =
+    MkFoo Int | Float :==> Double