From e331fe17d121ab8e99bcb038a4df5b15e0309fd9 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 5 Jul 2010 12:59:52 +0000 Subject: [PATCH] deprecate unGetChan and isEmptyChan (see #4154) --- Control/Concurrent/Chan.hs | 2 ++ 1 file changed, 2 insertions(+) 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. -- 1.7.10.4