blob: a9591d42235fb93dc1868acdaac5d24a71dda56b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-- !!! Simple test of dupChan
-- Embarassingly, the published version fails!
module Main where
import Control.Exception
import Control.Concurrent.Chan
main = do
chan <- newChan
ch <- dupChan chan
writeChan chan "done"
x <- readChan chan
y <- readChan ch
print ("Got "++x ++" "++y)
|