summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent/should_run/conc042.hs
blob: 9ebbf3e4ea19e7176dded84569fb88c9c504b9c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
module Main where

import GHC.Conc

-- Create a new TVar and check that it contains the expected value
main = do
  putStr "Before\n"
  t <- atomically ( newTVar 42 )
  r <- atomically ( readTVar t )
  putStr ("After " ++ (show r) ++ "\n")