[commit: ghc] wip/rae: Test #9404 (typecheck/should_compile/T9404 and T9404b) (e6e45a1)

git at git.haskell.org git at git.haskell.org
Wed Nov 12 18:28:26 UTC 2014


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/e6e45a1c497eae37fbc5daf5e201fe97181e840c/ghc

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

commit e6e45a1c497eae37fbc5daf5e201fe97181e840c
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Thu Aug 7 09:20:41 2014 -0400

    Test #9404 (typecheck/should_compile/T9404 and T9404b)


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

e6e45a1c497eae37fbc5daf5e201fe97181e840c
 testsuite/tests/typecheck/should_compile/T9404.hs  |  6 ++++++
 testsuite/tests/typecheck/should_compile/T9404b.hs | 15 +++++++++++++++
 testsuite/tests/typecheck/should_compile/all.T     |  2 ++
 3 files changed, 23 insertions(+)

diff --git a/testsuite/tests/typecheck/should_compile/T9404.hs b/testsuite/tests/typecheck/should_compile/T9404.hs
new file mode 100644
index 0000000..4cb530a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T9404.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE UnboxedTuples #-}
+
+module T9404 where
+
+foo _ = case seq () (# #) of (# #) -> ()
+foo2 _ = case () `seq` (# #) of (# #) -> ()
diff --git a/testsuite/tests/typecheck/should_compile/T9404b.hs b/testsuite/tests/typecheck/should_compile/T9404b.hs
new file mode 100644
index 0000000..f9db0a3
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T9404b.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE RankNTypes, TypeFamilies #-}
+
+module T9404b where
+
+type family ListTF x where
+  ListTF x = [x]
+
+bar :: (forall x. ListTF x -> Int) -> ()
+bar _ = ()
+
+myconst :: ((forall r. ListTF r -> Int) -> ()) -> x -> (forall r. ListTF r -> Int) -> ()
+myconst x _ = x
+
+foo = (bar `myconst` ()) $ length
+foo2 = (myconst bar ()) $ length
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index a6cb78a..8448411 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -422,3 +422,5 @@ test('T8856', normal, compile, [''])
 test('T9117', normal, compile, [''])
 test('T9117_2', expect_broken('9117'), compile, [''])
 test('T9708', normal, compile_fail, [''])
+test('T9404', expect_broken(9404), compile, [''])
+test('T9404b', expect_broken(9404), compile, [''])



More information about the ghc-commits mailing list