[commit: ghc] master: Test Trac #9975 (3992a6e)

git at git.haskell.org git at git.haskell.org
Thu Jan 22 09:41:27 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3992a6e2d0fa2f046baaf14c264d21acf9540c83/ghc

>---------------------------------------------------------------

commit 3992a6e2d0fa2f046baaf14c264d21acf9540c83
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Jan 20 17:31:54 2015 +0000

    Test Trac #9975


>---------------------------------------------------------------

3992a6e2d0fa2f046baaf14c264d21acf9540c83
 testsuite/tests/patsyn/should_compile/T9975a.hs     | 7 +++++++
 testsuite/tests/patsyn/should_compile/T9975a.stderr | 5 +++++
 testsuite/tests/patsyn/should_compile/T9975b.hs     | 7 +++++++
 testsuite/tests/patsyn/should_compile/all.T         | 2 ++
 4 files changed, 21 insertions(+)

diff --git a/testsuite/tests/patsyn/should_compile/T9975a.hs b/testsuite/tests/patsyn/should_compile/T9975a.hs
new file mode 100644
index 0000000..ed5a2c2
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T9975a.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE PatternSynonyms #-}
+module T9975a where
+
+data Test = Test { x :: Int }
+pattern Test wat = Test { x = wat }
+
diff --git a/testsuite/tests/patsyn/should_compile/T9975a.stderr b/testsuite/tests/patsyn/should_compile/T9975a.stderr
new file mode 100644
index 0000000..faddb2a
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T9975a.stderr
@@ -0,0 +1,5 @@
+
+T9975a.hs:6:1:
+    Multiple declarations of ‘Test’
+    Declared at: T9975a.hs:5:13
+                 T9975a.hs:6:1
diff --git a/testsuite/tests/patsyn/should_compile/T9975b.hs b/testsuite/tests/patsyn/should_compile/T9975b.hs
new file mode 100644
index 0000000..d36f54d
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T9975b.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE PatternSynonyms #-}
+module T9975b where
+
+data Test = Test { x :: Int }
+pattern PTest wat = Test { x = wat }
+
diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T
index 0ef30f0..a046e79 100644
--- a/testsuite/tests/patsyn/should_compile/all.T
+++ b/testsuite/tests/patsyn/should_compile/all.T
@@ -22,3 +22,5 @@ test('ImpExp_Imp', [extra_clean(['ImpExp_Exp.hi', 'ImpExp_Exp.o'])], multimod_co
 test('T9857', normal, compile, [''])
 test('T9889', normal, compile, [''])
 test('T9867', normal, compile, [''])
+test('T9975a', normal, compile_fail, [''])
+test('T9975b', normal, compile, [''])



More information about the ghc-commits mailing list