Permalink
Browse files

sync newBroadcastTChanIO with newBroadcastTChan

Spotted by wren ng thornton <wren@freegeek.org> on
libraries@haskell.org
  • Loading branch information...
1 parent 0a2c47a commit 1187332f18de8bdd8ede1d940fe035fe0acac424 @simonmar simonmar committed May 27, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 Control/Concurrent/STM/TChan.hs
@@ -105,9 +105,8 @@ newBroadcastTChan = do
-- | @IO@ version of 'newBroadcastTChan'.
newBroadcastTChanIO :: IO (TChan a)
newBroadcastTChanIO = do
- dummy_hole <- newTVarIO TNil
write_hole <- newTVarIO TNil
- read <- newTVarIO dummy_hole
+ read <- newTVarIO (error "reading from a TChan created by newBroadcastTChanIO; use dupTChan first")
write <- newTVarIO write_hole
return (TChan read write)

0 comments on commit 1187332

Please sign in to comment.