diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2014-08-07 09:20:41 -0400 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-12 12:36:43 -0500 |
commit | e6e45a1c497eae37fbc5daf5e201fe97181e840c (patch) | |
tree | ab3474c984782e90cbb1f9be1116d2389fd1eedb | |
parent | 294ac47ef7aa68d09cf730c60223259893fc0933 (diff) | |
download | haskell-e6e45a1c497eae37fbc5daf5e201fe97181e840c.tar.gz |
Test #9404 (typecheck/should_compile/T9404 and T9404b)
-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, ['']) |