From: Simon Marlow Date: Mon, 5 Jul 2010 12:59:52 +0000 (+0000) Subject: deprecate unGetChan and isEmptyChan (see #4154) X-Git-Tag: ghc-darcs-git-switchover~140 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e331fe17d121ab8e99bcb038a4df5b15e0309fd9;p=ghc-base.git deprecate unGetChan and isEmptyChan (see #4154) --- diff --git a/Control/Concurrent/Chan.hs b/Control/Concurrent/Chan.hs index 12f75c9..dfc46c3 100644 --- a/Control/Concurrent/Chan.hs +++ b/Control/Concurrent/Chan.hs @@ -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.