deprecate unGetChan and isEmptyChan (see #4154)
authorSimon Marlow <marlowsd@gmail.com>
Mon, 5 Jul 2010 12:59:52 +0000 (12:59 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 5 Jul 2010 12:59:52 +0000 (12:59 +0000)
Control/Concurrent/Chan.hs

index 12f75c9..dfc46c3 100644 (file)
@@ -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.