summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc214.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc214.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc214.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc214.hs b/testsuite/tests/typecheck/should_compile/tc214.hs
new file mode 100644
index 0000000000..e631854a1e
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc214.hs
@@ -0,0 +1,19 @@
+{-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags -XGADTs #-}
+
+-- This program sent GHC 6.6 into a loop, because the fixpointing
+-- of the substitution in type refinement got its in-scope-set
+-- from the answer!
+
+module ShouldCompile where
+
+------------------
+data Foo a b where F :: a -> Foo () a
+
+bar :: Foo () (forall a.a) -> ()
+bar (F _) = ()
+
+------------------
+data Foo2 a where F2 :: a -> Foo2 [a]
+
+bar2 :: Foo2 [forall a.a] -> ()
+bar2 (F2 _) = ()