blob: 6086708dd74b3aee4e85560be5555f82668e713f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-- !!! Simple test of dupChan
-- Embarrassingly, 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)
|