import Data.IORef main :: IO () main = do x <- newIORef (0 :: Int) writeIORef x 5 y <- readIORef x print y