blob: c23a7f39b4b2b86ffb9ec4a2f4a1bf6de38ac13b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
|