[project @ 1999-06-11 16:10:18 by simonmar]
authorsimonmar <unknown>
Fri, 11 Jun 1999 16:10:19 +0000 (16:10 +0000)
committersimonmar <unknown>
Fri, 11 Jun 1999 16:10:19 +0000 (16:10 +0000)
- add a test for non-parsing of strict newtype constructor fields
- other small fixes

ghc/tests/reader/should_compile/read017.hs
ghc/tests/reader/should_fail/expr001.hs
ghc/tests/reader/should_fail/read008.hs [new file with mode: 0644]
ghc/tests/reader/should_fail/read008.stderr [new file with mode: 0644]

index 3117391..e87fede 100644 (file)
@@ -10,3 +10,6 @@ x = 2 where
 y = 3
 
 instance Foo Int where
+
+f = f where g = g where
+type T = Int
index 03b34d9..764ffd9 100644 (file)
@@ -1,3 +1,5 @@
+module ShouldFail where
+
 {-
 From: Kevin Hammond <kh>
 To: partain
@@ -8,7 +10,7 @@ OK, I've fixed that little problem by disallowing,
 -}
 module Test where
 
-f x = x + if c then 1 else 2
+f x = x + if True then 1 else 2
 f x = x + 1::Int
 
 -- (the conditional/sig need to be parenthesised).  If this is
diff --git a/ghc/tests/reader/should_fail/read008.hs b/ghc/tests/reader/should_fail/read008.hs
new file mode 100644 (file)
index 0000000..606af91
--- /dev/null
@@ -0,0 +1,5 @@
+module ShouldFail where
+
+-- strictness annotations on the argument to a newtype constructor
+-- are not allowed.
+newtype N a = T ![a]
diff --git a/ghc/tests/reader/should_fail/read008.stderr b/ghc/tests/reader/should_fail/read008.stderr
new file mode 100644 (file)
index 0000000..bf43cd6
--- /dev/null
@@ -0,0 +1,4 @@
+read008.hs:5: parse error on input `!'
+
+Compilation had errors
+