No title

Anonymous Coward 2018-03-07 05:47:10.018042 UTC

1writeName nameTChan name = forkIO $ forever $ do
2 atomically $ writeTChan nameTChan name
3
4main = do
5 nameChan <- atomically $ newTChan
6 print "TChan created succesfully"
7
8 writeTChan nameChan "something"
9 -- i can't do that because nameChan is supposed to be STM but it is IO but if i just do newTChan
10 -- without atomically i can't execute it inside main
11
12 -- so what do i do ??
13
14