This commit is contained in:
Ranjeet Kumar Ranjan 2022-10-04 13:22:53 +05:30
parent e1e395f46b
commit 8c6c238e75

View File

@ -50,15 +50,15 @@ import qualified Streamly.Internal.Data.Stream.Type as Stream (fromStreamK)
import Streamly.Internal.Data.SVar
#if __GLASGOW_HASKELL__ < 810
#ifdef INSPECTION
import Control.Exception (Exception)
#if __GLASGOW_HASKELL__ < 810
import Control.Monad.Catch (MonadThrow)
import Control.Monad.Trans.Control (MonadBaseControl)
#endif
import Data.Typeable (Typeable)
import Test.Inspection (inspect, hasNoTypeClassesExcept)
#endif
#endif
------------------------------------------------------------------------------
-- Generating streams from SVar
@ -161,7 +161,6 @@ fromStreamVar sv = K.MkStream $ \st yld sng stp -> do
sid <- liftIO $ readIORef (svarStopBy sv)
return $ tid == sid
#if __GLASGOW_HASKELL__ < 810
#ifdef INSPECTION
-- Use of GHC constraint tuple (GHC.Classes.(%,,%)) in fromStreamVar leads to
-- space leak because the tuple gets allocated in every recursive call and each
@ -179,7 +178,6 @@ inspect $ hasNoTypeClassesExcept 'fromStreamVar
, ''Functor
]
#endif
#endif
-- | Generate a stream from an SVar. An unevaluated stream can be pushed to an
-- SVar using 'toSVar'. As we pull a stream from the SVar the input stream