summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail165.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail165.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail165.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail165.hs b/testsuite/tests/typecheck/should_fail/tcfail165.hs
new file mode 100644
index 0000000000..c23a7f39b4
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/tcfail165.hs
@@ -0,0 +1,16 @@
+{-# OPTIONS -XImpredicativeTypes -fno-warn-deprecated-flags #-}
+
+module ShouldFail where
+
+import Control.Concurrent
+
+-- Attempt to put a polymorphic value in an MVar
+-- Fails, but the error message is worth keeping an eye on
+--
+-- Actually (Dec 06) it succeeds now
+--
+-- In GHC 7.0 it fails again! (and rightly so)
+
+foo = do var <- newEmptyMVar :: IO (MVar (forall a. Show a => a -> String))
+ putMVar var (show :: forall b. Show b => b -> String)
+