Test Trac #7809
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 30 May 2013 13:16:59 +0000 (14:16 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 30 May 2013 13:29:45 +0000 (14:29 +0100)
testsuite/tests/typecheck/should_fail/T7809.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T7809.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T7809.hs b/testsuite/tests/typecheck/should_fail/T7809.hs
new file mode 100644 (file)
index 0000000..53c8d16
--- /dev/null
@@ -0,0 +1,9 @@
+{-# LANGUAGE RankNTypes, TypeFamilies, LiberalTypeSynonyms #-}
+module T7809 where
+
+type PolyId = (forall a. a -> a)
+
+type family F a
+
+foo :: F PolyId
+foo = undefined
\ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_fail/T7809.stderr b/testsuite/tests/typecheck/should_fail/T7809.stderr
new file mode 100644 (file)
index 0000000..b743926
--- /dev/null
@@ -0,0 +1,5 @@
+
+T7809.hs:8:8:
+    Illegal polymorphic or qualified type: PolyId
+    Perhaps you intended to use -XImpredicativeTypes
+    In the type signature for ‛foo’: foo :: F PolyId
index 4ec8410..0f1f7b4 100644 (file)
@@ -309,3 +309,4 @@ test('T7851', normal, compile_fail, [''])
 test('T7856', normal, compile_fail, [''])
 test('T7869', normal, compile_fail, [''])
 test('T7892', normal, compile_fail, [''])
+test('T7809', normal, compile_fail, [''])