[commit: ghc] wip/T8584: Add test cases (8ddac31)
git at git.haskell.org
git at git.haskell.org
Wed Nov 19 09:48:33 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T8584
Link : http://ghc.haskell.org/trac/ghc/changeset/8ddac3175d1aea97ec35ce1f32907c9827c97a51/ghc
>---------------------------------------------------------------
commit 8ddac3175d1aea97ec35ce1f32907c9827c97a51
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date: Fri Nov 14 16:21:45 2014 +0800
Add test cases
>---------------------------------------------------------------
8ddac3175d1aea97ec35ce1f32907c9827c97a51
testsuite/tests/patsyn/should_compile/T8584-1.hs | 8 ++++++++
testsuite/tests/patsyn/should_compile/T8968-1.hs | 8 ++++++++
testsuite/tests/patsyn/should_compile/all.T | 2 ++
3 files changed, 18 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..00aeb70
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T8584-1.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE PatternSynonyms #-}
+module ShouldCompile where
+
+pattern Single :: () => (Show a) => 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..f41ed53
--- /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 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 55e3b83..ed8961d 100644
--- a/testsuite/tests/patsyn/should_compile/all.T
+++ b/testsuite/tests/patsyn/should_compile/all.T
@@ -12,3 +12,5 @@ test('T8966', normal, compile, [''])
test('T9023', normal, compile, [''])
test('unboxed-bind-bang', normal, compile, [''])
test('T9732', normal, compile, [''])
+test('T8968-1', normal, compile, [''])
+test('T8584-1', normal, compile, [''])
More information about the ghc-commits
mailing list