on master help sign in
Add GHC 8.10.1 build to CI.
828a564Pranay Sashank
.github/workflows/haskell.yml+6−2
@@ -34,9 +34,13 @@ jobs:
34 strategy:
34 strategy:
35 fail-fast: false
35 fail-fast: false
36 matrix:
36 matrix:
37− name: [8.8.3+inspection+Werror, 8.6.5+streamk, 8.6.5+fusion-plugin]
37+ name: [8.10.1+inspection+Werror, 8.8.3+inspection+Werror, 8.6.5+streamk, 8.6.5+fusion-plugin]
38− cabal_version: ["3.0"]
38+ cabal_version: ["3.2"]
39 include:
39 include:
40+ - name: 8.10.1+inspection+Werror
41+ ghc_version: 8.10.1
42+ build: cabal-v2
43+ cabal_build_options: "--project-file=cabal.project.ci"
40 - name: 8.8.3+inspection+Werror
44 - name: 8.8.3+inspection+Werror
41 ghc_version: 8.8.3
45 ghc_version: 8.8.3
42 build: cabal-v2
46 build: cabal-v2
src/Streamly/Internal/Data/Stream/SVar.hs+4
@@ -42,6 +42,7 @@ import System.Mem (performMajorGC)
42import Streamly.Internal.Data.SVar
42import Streamly.Internal.Data.SVar
43import Streamly.Internal.Data.Stream.StreamK hiding (reverse)
43import Streamly.Internal.Data.Stream.StreamK hiding (reverse)
44
44
45+#if __GLASGOW_HASKELL__ < 810
45#ifdef INSPECTION
46#ifdef INSPECTION
46import Control.Exception (Exception)
47import Control.Exception (Exception)
47import Control.Monad.Catch (MonadThrow)
48import Control.Monad.Catch (MonadThrow)
@@ -49,6 +50,7 @@ import Control.Monad.Trans.Control (MonadBaseControl)
49import Data.Typeable (Typeable)
50import Data.Typeable (Typeable)
50import Test.Inspection (inspect, hasNoTypeClassesExcept)
51import Test.Inspection (inspect, hasNoTypeClassesExcept)
51#endif
52#endif
53+#endif
52
54
53-- | Pull a stream from an SVar.
55-- | Pull a stream from an SVar.
54{-# NOINLINE fromStreamVar #-}
56{-# NOINLINE fromStreamVar #-}
@@ -101,6 +103,7 @@ fromStreamVar sv = MkStream $ \st yld sng stp -> do
101 sid <- liftIO $ readIORef (svarStopBy sv)
103 sid <- liftIO $ readIORef (svarStopBy sv)
102 return $ if tid == sid then True else False
104 return $ if tid == sid then True else False
103
105
106+#if __GLASGOW_HASKELL__ < 810
104#ifdef INSPECTION
107#ifdef INSPECTION
105-- Use of GHC constraint tuple (GHC.Classes.(%,,%)) in fromStreamVar leads to
108-- Use of GHC constraint tuple (GHC.Classes.(%,,%)) in fromStreamVar leads to
106-- space leak because the tuple gets allocated in every recursive call and each
109-- space leak because the tuple gets allocated in every recursive call and each
@@ -118,6 +121,7 @@ inspect $ hasNoTypeClassesExcept 'fromStreamVar
118 , ''Functor
121 , ''Functor
119 ]
122 ]
120#endif
123#endif
124+#endif
121
125
122{-# INLINE fromSVar #-}
126{-# INLINE fromSVar #-}
123fromSVar :: (MonadAsync m, IsStream t) => SVar Stream m a -> t m a
127fromSVar :: (MonadAsync m, IsStream t) => SVar Stream m a -> t m a
streamly.cabal+1
@@ -86,6 +86,7 @@ tested-with: GHC==7.10.3
86 , GHC==8.4.4
86 , GHC==8.4.4
87 , GHC==8.6.5
87 , GHC==8.6.5
88 , GHC==8.8.1
88 , GHC==8.8.1
89+ , GHC==8.10.1
89author: Harendra Kumar
90author: Harendra Kumar
90maintainer: streamly@composewell.com
91maintainer: streamly@composewell.com
91copyright: 2017 Harendra Kumar
92copyright: 2017 Harendra Kumar
test/Main.hs+3−7
@@ -6,7 +6,7 @@
6module Main (main) where
6module Main (main) where
7
7
8import Control.Concurrent (threadDelay)
8import Control.Concurrent (threadDelay)
9−import Control.Exception (Exception, try, ErrorCall(..), catch, throw)
9+import Control.Exception (Exception, try, ErrorCall(..), catch)
10import Control.Monad (void)
10import Control.Monad (void)
11import Control.Monad.Catch (throwM, MonadThrow)
11import Control.Monad.Catch (throwM, MonadThrow)
12import Control.Monad.Error.Class (throwError, MonadError)
12import Control.Monad.Error.Class (throwError, MonadError)
@@ -669,9 +669,7 @@ checkFoldl'Strictness = do
669 let s = return (1 :: Int) `S.consM` error "failure"
669 let s = return (1 :: Int) `S.consM` error "failure"
670 catch (S.foldl' (\_ a -> if a == 1 then error "success" else "done")
670 catch (S.foldl' (\_ a -> if a == 1 then error "success" else "done")
671 "begin" s)
671 "begin" s)
672− (\e -> case e of
673− ErrorCall err -> return err
672+ (\(ErrorCall err) -> return err)
674− _ -> throw e)
675 `shouldReturn` "success"
673 `shouldReturn` "success"
676
674
677#ifdef DEVBUILD
675#ifdef DEVBUILD
@@ -708,9 +706,7 @@ checkScanl'Strictness = do
708 s)
706 s)
709 >> return "finished"
707 >> return "finished"
710 )
708 )
711− (\e -> case e of
712− ErrorCall err -> return err
709+ (\(ErrorCall err) -> return err)
713− _ -> throw e)
714 `shouldReturn` "success"
710 `shouldReturn` "success"
715
711
716foldlM'StrictCheck :: IORef Int -> SerialT IO Int -> IO ()
712foldlM'StrictCheck :: IORef Int -> SerialT IO Int -> IO ()