From: lewie Date: Mon, 23 Apr 2001 19:25:06 +0000 (+0000) Subject: [project @ 2001-04-23 19:25:06 by lewie] X-Git-Tag: Approximately_9120_patches~2118 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=23c27aa22426b980a2bd8c68e013673e23051a3f;p=ghc-hetmet.git [project @ 2001-04-23 19:25:06 by lewie] Adding tests for infix decls w/ infix data constructors --- diff --git a/ghc/tests/reader/should_compile/read030.hs b/ghc/tests/reader/should_compile/read030.hs new file mode 100644 index 0000000..2688302 --- /dev/null +++ b/ghc/tests/reader/should_compile/read030.hs @@ -0,0 +1,10 @@ +-- !!! Infix decls w/ infix data constructors + +-- GHC used to barf on this... + +module ShouldCompile where + +infix 2 |-, |+ + +ps |- q:qs = undefined +ps |+ p:q:qs = undefined diff --git a/ghc/tests/reader/should_fail/read016.hs b/ghc/tests/reader/should_fail/read016.hs new file mode 100644 index 0000000..493606a --- /dev/null +++ b/ghc/tests/reader/should_fail/read016.hs @@ -0,0 +1,7 @@ +-- !!! Infix decls w/ infix data constructors + +module ShouldFail where + +infix 6 |- + +ps |- q:qs = undefined diff --git a/ghc/tests/reader/should_fail/read016.stderr b/ghc/tests/reader/should_fail/read016.stderr new file mode 100644 index 0000000..0372411 --- /dev/null +++ b/ghc/tests/reader/should_fail/read016.stderr @@ -0,0 +1,4 @@ + +read016.hs:7: + precedence parsing error + cannot mix `|-' [infix 6] and `:' [infixr 5] in the same infix expression diff --git a/ghc/tests/reader/should_fail/read016.stdout b/ghc/tests/reader/should_fail/read016.stdout new file mode 100644 index 0000000..7c7f529 --- /dev/null +++ b/ghc/tests/reader/should_fail/read016.stdout @@ -0,0 +1,7 @@ + +==================== Parser ==================== +module ShouldFail where +|- ps q : qs = undefined +infix 6 |- + +