Remove CPP macros related to __GLASGOW_HASKLL__

This commit is contained in:
Ranjeet Kumar Ranjan 2022-10-03 10:29:44 +05:30
parent 249efda55e
commit 1834bb8ad6
3 changed files with 4 additions and 7 deletions

View File

@ -48,7 +48,7 @@ import Streamly.Internal.Data.Stream.Channel.Types
import Prelude hiding (map, concat, concatMap)
#if __GLASGOW_HASKELL__ < 810
#if MIN_VERSION_base(4,13,0)
#ifdef INSPECTION
import Control.Exception (Exception)
import Control.Monad.Catch (MonadThrow)
@ -159,7 +159,7 @@ fromChannelRaw sv = K.MkStream $ \st yld sng stp -> do
liftIO (cleanupSVar (workerThreads sv))
throwM ex
#if __GLASGOW_HASKELL__ < 810
#if MIN_VERSION_base(4,13,0)
#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

View File

@ -32,9 +32,6 @@ import Control.Exception (assert)
import Control.Monad (when, void)
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.IORef (IORef, modifyIORef, readIORef, writeIORef)
#if __GLASGOW_HASKELL__ < 804
import Data.Semigroup ((<>))
#endif
import Streamly.Internal.Data.Atomics (atomicModifyIORefCAS, writeBarrier)
import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
import Streamly.Internal.Data.Time.Units

View File

@ -50,7 +50,7 @@ import qualified Streamly.Internal.Data.Stream.Type as Stream (fromStreamK)
import Streamly.Internal.Data.SVar
#if __GLASGOW_HASKELL__ < 810
#if MIN_VERSION_base(4,13,0)
#ifdef INSPECTION
import Control.Exception (Exception)
import Control.Monad.Catch (MonadThrow)
@ -161,7 +161,7 @@ fromStreamVar sv = K.MkStream $ \st yld sng stp -> do
sid <- liftIO $ readIORef (svarStopBy sv)
return $ tid == sid
#if __GLASGOW_HASKELL__ < 810
#if MIN_VERSION_base(4,13,0)
#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