From: simonmar Date: Fri, 11 Jun 1999 16:10:19 +0000 (+0000) Subject: [project @ 1999-06-11 16:10:18 by simonmar] X-Git-Tag: Approximately_9120_patches~6134 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b1467fdcf79121391f6029ac9c686ac13d816d18;p=ghc-hetmet.git [project @ 1999-06-11 16:10:18 by simonmar] - add a test for non-parsing of strict newtype constructor fields - other small fixes --- diff --git a/ghc/tests/reader/should_compile/read017.hs b/ghc/tests/reader/should_compile/read017.hs index 3117391..e87fede 100644 --- a/ghc/tests/reader/should_compile/read017.hs +++ b/ghc/tests/reader/should_compile/read017.hs @@ -10,3 +10,6 @@ x = 2 where y = 3 instance Foo Int where + +f = f where g = g where +type T = Int diff --git a/ghc/tests/reader/should_fail/expr001.hs b/ghc/tests/reader/should_fail/expr001.hs index 03b34d9..764ffd9 100644 --- a/ghc/tests/reader/should_fail/expr001.hs +++ b/ghc/tests/reader/should_fail/expr001.hs @@ -1,3 +1,5 @@ +module ShouldFail where + {- From: Kevin Hammond 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 index 0000000..606af91 --- /dev/null +++ b/ghc/tests/reader/should_fail/read008.hs @@ -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 index 0000000..bf43cd6 --- /dev/null +++ b/ghc/tests/reader/should_fail/read008.stderr @@ -0,0 +1,4 @@ +read008.hs:5: parse error on input `!' + +Compilation had errors +