@@ -42,6 +42,7 @@ import System.Mem (performMajorGC)
4242import Streamly.Internal.Data.SVar
4343import Streamly.Internal.Data.Stream.StreamK hiding (reverse)
4444
45+#if __GLASGOW_HASKELL__ < 810
4546#ifdef INSPECTION
4647import Control.Exception (Exception)
4748import Control.Monad.Catch (MonadThrow)
@@ -49,6 +50,7 @@ import Control.Monad.Trans.Control (MonadBaseControl)
4950import Data.Typeable (Typeable)
5051import Test.Inspection (inspect, hasNoTypeClassesExcept)
5152#endif
53+#endif
5254
5355-- | Pull a stream from an SVar.
5456{-# NOINLINE fromStreamVar #-}
@@ -101,6 +103,7 @@ fromStreamVar sv = MkStream $ \st yld sng stp -> do
101103 sid <- liftIO $ readIORef (svarStopBy sv)
102104 return $ if tid == sid then True else False
103105
106+#if __GLASGOW_HASKELL__ < 810
104107#ifdef INSPECTION
105108-- Use of GHC constraint tuple (GHC.Classes.(%,,%)) in fromStreamVar leads to
106109-- space leak because the tuple gets allocated in every recursive call and each
@@ -118,6 +121,7 @@ inspect $ hasNoTypeClassesExcept 'fromStreamVar
118121 , ''Functor
119122 ]
120123#endif
124+#endif
121125
122126{-# INLINE fromSVar #-}
123127fromSVar :: (MonadAsync m, IsStream t) => SVar Stream m a -> t m a