[commit: ghc] wip/T8584: Add test cases (8ea3a36)
git at git.haskell.org
git at git.haskell.org
Wed Nov 12 12:05:57 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T8584
Link : http://ghc.haskell.org/trac/ghc/changeset/8ea3a36666982c8631b9a9ad7a54674a3fa5ae06/ghc
>---------------------------------------------------------------
commit 8ea3a36666982c8631b9a9ad7a54674a3fa5ae06
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date: Sun Nov 2 14:35:49 2014 +0800
Add test cases
>---------------------------------------------------------------
8ea3a36666982c8631b9a9ad7a54674a3fa5ae06
testsuite/tests/patsyn/should_compile/T8584-1.hs | 10 ++++++++++
testsuite/tests/patsyn/should_compile/T8968-1.hs | 8 ++++++++
testsuite/tests/patsyn/should_compile/all.T | 2 ++
3 files changed, 20 insertions(+)
diff --git a/testsuite/tests/patsyn/should_compile/T8584-1.hs b/testsuite/tests/patsyn/should_compile/T8584-1.hs
new file mode 100644
index 0000000..7a017c8
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T8584-1.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE PatternSynonyms #-}
+module ShouldCompile where
+
+pattern type (Eq a) => Single a :: (Show a) => [a]
+-- pattern type Single a :: (Eq a, Show a) => [a]
+-- pattern type Single a :: [a]
+pattern Single x = [x]
+
+-- f :: (Show a) => [a] -> a
+foobar (Single x) = x
diff --git a/testsuite/tests/patsyn/should_compile/T8968-1.hs b/testsuite/tests/patsyn/should_compile/T8968-1.hs
new file mode 100644
index 0000000..f4a1dc4
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T8968-1.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs, KindSignatures, PatternSynonyms #-}
+module ShouldCompile where
+
+data X :: (* -> *) -> * -> * where
+ Y :: f a -> X f (Maybe a)
+
+pattern type C a :: X Maybe (Maybe a)
+pattern C x = Y (Just x)
diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T
index d851bc3..8896008 100644
--- a/testsuite/tests/patsyn/should_compile/all.T
+++ b/testsuite/tests/patsyn/should_compile/all.T
@@ -10,3 +10,5 @@ test('incomplete', normal, compile, [''])
test('export', normal, compile, [''])
test('T8966', normal, compile, [''])
test('T9023', normal, compile, [''])
+test('T8968-1', normal, compile, [''])
+test('T8584-1', normal, compile, [''])
More information about the ghc-commits
mailing list