diff options
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T9404.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T9404b.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 2 |
3 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T9404.hs b/testsuite/tests/typecheck/should_compile/T9404.hs new file mode 100644 index 0000000000..4cb530a492 --- /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 0000000000..f9db0a3897 --- /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 a6cb78a3cd..8448411d7c 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, ['']) |