[commit: ghc] wip/T8584: Add test cases (e87edf0)

git at git.haskell.org git at git.haskell.org
Fri Nov 14 09:36:59 UTC 2014


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

On branch  : wip/T8584
Link       : http://ghc.haskell.org/trac/ghc/changeset/e87edf08c59e23c725296e85672ce380b0643a20/ghc

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

commit e87edf08c59e23c725296e85672ce380b0643a20
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date:   Fri Nov 14 16:21:45 2014 +0800

    Add test cases


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

e87edf08c59e23c725296e85672ce380b0643a20
 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