Bump `base` version to 4.9.0.0 (closes #11026)
[ghc.git] / testsuite / tests / typecheck / should_fail / T5689.hs
1 {-# LANGUAGE ScopedTypeVariables #-}
2
3 module Main where
4 import Data.IORef
5
6 main :: IO ()
7 main = do { (r :: IORef (t -> t)) <- newIORef id
8 -- r <- newIORef i -- => Type-check error
9
10 ; writeIORef r (\v -> if v then False else True)
11
12 ; c <- readIORef r
13
14 ; print $ c True
15 ; print $ c 1234 }