[project @ 1999-08-04 15:54:23 by simonmar]
authorsimonmar <unknown>
Wed, 4 Aug 1999 15:54:23 +0000 (15:54 +0000)
committersimonmar <unknown>
Wed, 4 Aug 1999 15:54:23 +0000 (15:54 +0000)
sync the output for these tests

ghc/tests/reader/should_fail/Makefile
ghc/tests/reader/should_fail/read001.stderr
ghc/tests/reader/should_fail/read003.stderr
ghc/tests/reader/should_fail/read005.stderr
ghc/tests/reader/should_fail/read006.stderr
ghc/tests/reader/should_fail/read007.stderr
ghc/tests/reader/should_fail/read009.stderr

index 56488c6..45f2223 100644 (file)
@@ -2,6 +2,6 @@ TOP = ../..
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/should_fail.mk
 
-SRC_HC_OPTS += -noC -ddump-rdr
+SRC_HC_OPTS += -noC -ddump-parsed
 
 include $(TOP)/mk/target.mk
index 3e0d15f..df2b6d8 100644 (file)
@@ -1,38 +1,35 @@
 
-==================== Reader ====================
+==================== Parser ====================
 module OneOfEverything (
-       fixn, FooData, FooDataB(..), FooDataC(..),
-       EqTree(EqLeaf, EqBranch), EqClass(..), OrdClass(orda, ordb),
-       module OneC, module OneOfEverything
+       module OneOfEverything, module OneC, OrdClass(orda, ordb),
+       EqClass(..), EqTree(EqLeaf, EqBranch), FooDataC(..), FooDataB(..),
+       FooData, fixn
     ) where
 import Prelude
 import IO (putStr)
 import System hiding (getArgs)
 import Monad
 {- rec -}
-g :: (Num a, Eq b) => Foo a -> [b] -> (a, a, a) -> b
-bindwith :: (OrdClass a, OrdClass b) => a -> b -> b
-fixn x y = x
-fixl x y = x
-fixr x y = x
-singlebind x = x
-bindwith a b = b
-reca a = recb a
-recb a = reca a
-(~(a, b, c))
-    | nullity b = a
-    | nullity c = a
-    | otherwise = a
-    where
-       {- rec -}
-       nullity = null
-mat a b c d
-      | foof a b = d
-      | foof a c = d
-      | foof b c = d
-      where
-         {- rec -}
-         foof a b = a zeze b
+bindwith ::
+    {- implicit forall -} (OrdClass a, OrdClass b) => a -> b -> b
+g ::
+    {- implicit forall -}
+    (Num a, Eq b) =>
+    Foo a -> [b] -> (a, a, a) -> b
+g x y zz = head y
+f _
+  x
+  1
+  1.93
+  'c'
+  "dog"
+  ~y
+  (zz@(Foo a b))
+  (c Bar d)
+  [1, 2]
+  (3, 4)
+  ((n+42))
+    = y
 expr a b c d
        = ((((((((a zp (ZC a b)) zp (a ZC b))
               zp (((1 zm 'c') zm "abc") zm 1.293))
@@ -52,60 +49,71 @@ expr a b c d
               {- rec -}
               y = foo
             in
-              (((((((y zp [1, 2, 3, 4]) zp (4, 3, 2, 1)) zp (4 :: (Num a) => a))
+              (((((((y zp [1, 2, 3, 4]) zp (4, 3, 2, 1))
+                   zp (4 :: {- implicit forall -} (Num a) => a))
                   zp (if 42 zeze 42.0 then 1 else 4))
                  zp ([1 .. ]))
                 zp ([2, 4 .. ]))
                zp ([3 .. 5]))
               zp ([4, 8 .. 999]))
-f _
-  x
-  1
-  1.93
-  'c'
-  "dog"
-  ~y
-  (zz@(Foo a b))
-  (c Bar d)
-  [1, 2]
-  (3, 4)
-  ((n+42))
-    = y
-g x y zz = head y
-default (Integer, Rational)
-instance (Eq a) => EqClass (EqTree a) where
-    []
-    eqc x = 'a'
-class (Ord a) => OrdClass a where {
-    ordc :: a -> Char; ordb :: a -> Char; orda :: a -> Char;
-    }
+mat a b c d
+      | foof a b = d
+      | foof a c = d
+      | foof b c = d
+      where
+         {- rec -}
+         foof a b = a zeze b
+(~(a, b, c))
+    | nullity b = a
+    | nullity c = a
+    | otherwise = a
+    where
+       {- rec -}
+       nullity = null
+recb a = reca a
+reca a = recb a
+bindwith a b = b
+singlebind x = x
+fixr x y = x
+fixl x y = x
+fixn x y = x
+infix 6 fixn
+infixl 7 zpzh
+infixr 8 fixr
+type Pair a b = (a, b)
+data FooData = forall. FooCon Int
+data FooDataB = forall. FooConB Double
+data (Eq a) => EqTree a =
+    forall. EqLeaf a | forall. EqBranch (EqLeaf a) (EqLeaf a)
 class (Eq a) => EqClass a where {
-    eqc :: a -> Char;
+    eqc :: {- implicit forall -} a -> Char;
     eqc x = '?'
     }
-data (Eq a) => EqTree a = EqLeaf a | EqBranch (EqLeaf a) (EqLeaf a)
-data FooDataB = FooConB Double
-data FooData = FooCon Int
-type Pair a b = (a, b)
-infixr 8 fixr
-infixl 7 zpzh
-infix 6 fixn
-
+class (Ord a) => OrdClass a where {
+    orda :: {- implicit forall -} a -> Char;
+    ordb :: {- implicit forall -} a -> Char;
+    ordc :: {- implicit forall -} a -> Char;
+    }
+instance {- implicit forall -} (Eq a) => EqClass (EqTree a) where
+    []
+    eqc x = 'a'
+default (Rational, Integer)
 
 
-read001.hs:5: Type constructor or class not in scope: `FooDataC'
 
 read001.hs:5: Unknown module in export list: module `OneC'
 
-read001.hs:40: Type constructor or class not in scope: `EqLeaf'
+read001.hs:5: Type constructor or class not in scope: `FooDataC'
 
-read001.hs:40: Type constructor or class not in scope: `EqLeaf'
+read001.hs:38: Type constructor or class not in scope: `EqLeaf'
 
-read001.hs:80: Variable not in scope: `isSpace'
+read001.hs:38: Type constructor or class not in scope: `EqLeaf'
 
 read001.hs:87: Variable not in scope: `x'
 
-read001.hs:87: Variable not in scope: `x'
+read001.hs:88: Variable not in scope: `x'
+
+read001.hs:94: Variable not in scope: `isSpace'
 
 read001.hs:95: Variable not in scope: `foo'
 
index 9deee4d..801f5c6 100644 (file)
@@ -1,5 +1,5 @@
 
-==================== Reader ====================
+==================== Parser ====================
 module Read003 where
 {- rec -}
 ~(a, b, c)
index 36a567b..8b28be0 100644 (file)
@@ -1,2 +1,4 @@
-read005.hs:4:7: Illegal character escape: `\&'
-read005.hs:4:7:  on input: "&"
+read005.hs:4: error in character literal
+
+Compilation had errors
+
index 230584f..f1f31a5 100644 (file)
@@ -1 +1,4 @@
-read006.hs:8:12: parse error on input: "@"
+read006.hs:8: parse error on input `@'
+
+Compilation had errors
+
index 2afd40e..2702f2d 100644 (file)
@@ -1 +1,18 @@
-read007.hs:7:3: variable application in pattern on input: "return"
+
+==================== Parser ====================
+module ShouldFail where
+{- rec -}
+f :: {- implicit forall -} Int -> IO Int
+f x = do
+       (2 zp 2) <- 2
+       return x
+
+
+
+read007.hs:6:
+    `+' is not a data constructor
+    In the pattern: 2 + 2
+    In a do statement:: (2 + 2) <- 2
+
+Compilation had errors
+
index 249a080..0755843 100644 (file)
@@ -1,3 +1,16 @@
-This current error message is rather unhelpful:
 
-       read009.hs:12: parse error on input `'
+==================== Parser ====================
+module ShouldFail where
+{- rec -}
+h x = x
+foo = do
+       let {- rec -}
+           foo = True
+
+
+
+read009.hs:5:
+    `do' statements must end in expression: do let foo = True
+
+Compilation had errors
+