No title

Anonymous Coward 2018-03-07 06:00:57.779225 UTC

1main = do
2 nameChan <- atomically $ newTChan
3 -- here nameChan is of Type IO TChan
4
5 atomically $ writeTChan nameChan "something"
6 -- here writeTChan is expecting STM TChan but is happily accepting IO TChan
7 msg <- atomically $ readTChan nameChan
8 -- same happens here
9
10 print msg