diff options
Diffstat (limited to 'testsuite/tests/concurrent/should_run/conc025.hs')
-rw-r--r-- | testsuite/tests/concurrent/should_run/conc025.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/concurrent/should_run/conc025.hs b/testsuite/tests/concurrent/should_run/conc025.hs new file mode 100644 index 0000000000..a9591d4223 --- /dev/null +++ b/testsuite/tests/concurrent/should_run/conc025.hs @@ -0,0 +1,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) + |