summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorsimonmar <unknown>1999-08-04 15:54:23 +0000
committersimonmar <unknown>1999-08-04 15:54:23 +0000
commit594aa4b52a8706d6823bbd63420d4c508c1b37ed (patch)
treee27750afc3f40e9573af8f0820089d506367f2ab /ghc
parentaa75ede16e31baaf0853478c324a6ff6264ff78d (diff)
downloadhaskell-594aa4b52a8706d6823bbd63420d4c508c1b37ed.tar.gz
[project @ 1999-08-04 15:54:23 by simonmar]
sync the output for these tests
Diffstat (limited to 'ghc')
-rw-r--r--ghc/tests/reader/should_fail/Makefile2
-rw-r--r--ghc/tests/reader/should_fail/read001.stderr134
-rw-r--r--ghc/tests/reader/should_fail/read003.stderr2
-rw-r--r--ghc/tests/reader/should_fail/read005.stderr6
-rw-r--r--ghc/tests/reader/should_fail/read006.stderr5
-rw-r--r--ghc/tests/reader/should_fail/read007.stderr19
-rw-r--r--ghc/tests/reader/should_fail/read009.stderr17
7 files changed, 114 insertions, 71 deletions
diff --git a/ghc/tests/reader/should_fail/Makefile b/ghc/tests/reader/should_fail/Makefile
index 56488c6ce7..45f222367f 100644
--- a/ghc/tests/reader/should_fail/Makefile
+++ b/ghc/tests/reader/should_fail/Makefile
@@ -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
diff --git a/ghc/tests/reader/should_fail/read001.stderr b/ghc/tests/reader/should_fail/read001.stderr
index 3e0d15f0cf..df2b6d8b50 100644
--- a/ghc/tests/reader/should_fail/read001.stderr
+++ b/ghc/tests/reader/should_fail/read001.stderr
@@ -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'
diff --git a/ghc/tests/reader/should_fail/read003.stderr b/ghc/tests/reader/should_fail/read003.stderr
index 9deee4dd30..801f5c633d 100644
--- a/ghc/tests/reader/should_fail/read003.stderr
+++ b/ghc/tests/reader/should_fail/read003.stderr
@@ -1,5 +1,5 @@
-==================== Reader ====================
+==================== Parser ====================
module Read003 where
{- rec -}
~(a, b, c)
diff --git a/ghc/tests/reader/should_fail/read005.stderr b/ghc/tests/reader/should_fail/read005.stderr
index 36a567b27e..8b28be08bc 100644
--- a/ghc/tests/reader/should_fail/read005.stderr
+++ b/ghc/tests/reader/should_fail/read005.stderr
@@ -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
+
diff --git a/ghc/tests/reader/should_fail/read006.stderr b/ghc/tests/reader/should_fail/read006.stderr
index 230584fd58..f1f31a599b 100644
--- a/ghc/tests/reader/should_fail/read006.stderr
+++ b/ghc/tests/reader/should_fail/read006.stderr
@@ -1 +1,4 @@
-read006.hs:8:12: parse error on input: "@"
+read006.hs:8: parse error on input `@'
+
+Compilation had errors
+
diff --git a/ghc/tests/reader/should_fail/read007.stderr b/ghc/tests/reader/should_fail/read007.stderr
index 2afd40efd7..2702f2d91c 100644
--- a/ghc/tests/reader/should_fail/read007.stderr
+++ b/ghc/tests/reader/should_fail/read007.stderr
@@ -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
+
diff --git a/ghc/tests/reader/should_fail/read009.stderr b/ghc/tests/reader/should_fail/read009.stderr
index 249a080b61..07558435d6 100644
--- a/ghc/tests/reader/should_fail/read009.stderr
+++ b/ghc/tests/reader/should_fail/read009.stderr
@@ -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
+