mirror of
https://github.com/composewell/streamly.git
synced 2024-08-16 15:00:25 +03:00
Use GHC-9.4.2 for inspection tests (#1884)
This commit is contained in:
parent
36410d9ff6
commit
73b15ccbde
10
.github/workflows/haskell.yml
vendored
10
.github/workflows/haskell.yml
vendored
@ -55,7 +55,7 @@ jobs:
|
||||
matrix:
|
||||
# The order is important to optimize fail-fast.
|
||||
name:
|
||||
- 8.10.7-fusion-inspection-Werror
|
||||
- 8.10.7-Werror
|
||||
- 9.2.4-docspec
|
||||
# - 8.10.7-coverage
|
||||
|
||||
@ -71,13 +71,14 @@ jobs:
|
||||
cabal_project: cabal.project.ghc-head
|
||||
disable_sdist_build: "y"
|
||||
ignore_error: true
|
||||
- name: 9.4.2
|
||||
- name: 9.4.2-fusion-inspection
|
||||
ghc_version: 9.4.2
|
||||
runner: ubuntu-latest
|
||||
build: cabal
|
||||
cabal_project: cabal.project
|
||||
cabal_version: 3.8.1.0
|
||||
disable_sdist_build: "y"
|
||||
cabal_project: cabal.project
|
||||
cabal_build_options: "--flag fusion-plugin --flag inspection"
|
||||
ignore_error: false
|
||||
- name: 9.2.4
|
||||
ghc_version: 9.2.4
|
||||
@ -125,14 +126,13 @@ jobs:
|
||||
# coverage: "y"
|
||||
# cabal_version: 3.6.2.0
|
||||
# ignore_error: false
|
||||
- name: 8.10.7-fusion-inspection-Werror
|
||||
- name: 8.10.7-Werror
|
||||
ghc_version: 8.10.7
|
||||
runner: ubuntu-latest
|
||||
build: cabal
|
||||
cabal_version: 3.6.2.0
|
||||
cabal_project: cabal.project.Werror
|
||||
disable_sdist_build: "y"
|
||||
cabal_build_options: "--flag fusion-plugin --flag inspection"
|
||||
ignore_error: false
|
||||
- name: 8.8.4-fusion
|
||||
ghc_version: 8.8.4
|
||||
|
@ -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
|
||||
|
@ -48,15 +48,11 @@ import Streamly.Internal.Data.Stream.Channel.Types
|
||||
|
||||
import Prelude hiding (map, concat, concatMap)
|
||||
|
||||
#if __GLASGOW_HASKELL__ < 810
|
||||
#ifdef INSPECTION
|
||||
import Control.Exception (Exception)
|
||||
import Control.Monad.Catch (MonadThrow)
|
||||
import Control.Monad.Trans.Control (MonadBaseControl)
|
||||
import Data.Typeable (Typeable)
|
||||
import Test.Inspection (inspect, hasNoTypeClassesExcept)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Generating streams from a channel
|
||||
@ -167,14 +163,13 @@ fromChannelRaw sv = K.MkStream $ \st yld sng stp -> do
|
||||
liftIO (cleanupSVar (workerThreads sv))
|
||||
cleanup >> throwM ex
|
||||
|
||||
#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
|
||||
-- allocation holds on to the previous allocation. This test is to make sure
|
||||
-- that we do not use the constraint tuple type class.
|
||||
--
|
||||
inspect $ hasNoTypeClassesExcept 'fromStreamVar
|
||||
inspect $ hasNoTypeClassesExcept 'fromChannelRaw
|
||||
[ ''Monad
|
||||
, ''Applicative
|
||||
, ''MonadThrow
|
||||
@ -185,7 +180,6 @@ inspect $ hasNoTypeClassesExcept 'fromStreamVar
|
||||
, ''Functor
|
||||
]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-- XXX fromChannel Should not be called multiple times, we can add a
|
||||
-- safeguard for that. Or we can replicate the stream so that we can distribute
|
||||
|
@ -50,7 +50,6 @@ 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)
|
||||
import Control.Monad.Catch (MonadThrow)
|
||||
@ -58,7 +57,7 @@ import Control.Monad.Trans.Control (MonadBaseControl)
|
||||
import Data.Typeable (Typeable)
|
||||
import Test.Inspection (inspect, hasNoTypeClassesExcept)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Generating streams from SVar
|
||||
@ -161,7 +160,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 +177,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
|
||||
|
Loading…
Reference in New Issue
Block a user