Commit aae6f867 authored by Simon Marlow's avatar Simon Marlow
Browse files

deprecate unGetChan and isEmptyChan (see #4154)

parent a76bad5b
......@@ -106,6 +106,7 @@ unGetChan (Chan readVar _) val = do
modifyMVar_ readVar $ \read_end -> do
putMVar new_read_end (ChItem val read_end)
return new_read_end
{-# DEPRECATED unGetChan "if you need this operation, use Control.Concurrent.STM.TChan instead. See http://hackage.haskell.org/trac/ghc/ticket/4154 for details" #-}
-- |Returns 'True' if the supplied 'Chan' is empty.
isEmptyChan :: Chan a -> IO Bool
......@@ -114,6 +115,7 @@ isEmptyChan (Chan readVar writeVar) = do
w <- readMVar writeVar
let eq = r == w
eq `seq` return eq
{-# DEPRECATED isEmptyChan "if you need this operation, use Control.Concurrent.STM.TChan instead. See http://hackage.haskell.org/trac/ghc/ticket/4154 for details" #-}
-- Operators for interfacing with functional streams.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment