on master help sign in
Fix warnings for GHC 9.6 and 9.8
a11fe00Harendra Kumar
benchmark/Streamly/Benchmark/Data/Serialize.hs+1−1
@@ -318,7 +318,7 @@ loop count f val = go count val
318-- The first arg of "f" is the environment which is not threaded around in the
318-- The first arg of "f" is the environment which is not threaded around in the
319-- loop.
319-- loop.
320{-# INLINE loopWith #-}
320{-# INLINE loopWith #-}
321−loopWith :: Int -> (env -> a -> IO b) -> env -> a -> IO ()
321+loopWith :: Int -> (e -> a -> IO b) -> e -> a -> IO ()
322loopWith count f e val = go count val
322loopWith count f e val = go count val
323 where
323 where
324
324
benchmark/Streamly/Benchmark/Data/Stream/Common.hs+2
@@ -71,7 +71,9 @@ module Stream.Common
71 )
71 )
72where
72where
73
73
74+#if !MIN_VERSION_base(4,18,0)
74import Control.Applicative (liftA2)
75import Control.Applicative (liftA2)
76+#endif
75import Control.DeepSeq (NFData)
77import Control.DeepSeq (NFData)
76import Control.Exception (try)
78import Control.Exception (try)
77import GHC.Exception (ErrorCall)
79import GHC.Exception (ErrorCall)
benchmark/Streamly/Benchmark/Data/Stream/StreamD.hs+2
@@ -22,7 +22,9 @@
22
22
23module Main (main) where
23module Main (main) where
24
24
25+#if !MIN_VERSION_base(4,18,0)
25import Control.Applicative (liftA2)
26import Control.Applicative (liftA2)
27+#endif
26import Control.Monad (when)
28import Control.Monad (when)
27import Data.Maybe (isJust)
29import Data.Maybe (isJust)
28import Gauge (bench, nfIO, bgroup, Benchmark, defaultMain)
30import Gauge (bench, nfIO, bgroup, Benchmark, defaultMain)
benchmark/Streamly/Benchmark/Data/Stream/StreamK.hs+2
@@ -21,7 +21,9 @@
21
21
22module Main (main) where
22module Main (main) where
23
23
24+#if !MIN_VERSION_base(4,18,0)
24import Control.Applicative (liftA2)
25import Control.Applicative (liftA2)
26+#endif
25import Control.Monad (when)
27import Control.Monad (when)
26import Data.Maybe (isJust)
28import Data.Maybe (isJust)
27import System.Random (randomRIO)
29import System.Random (randomRIO)
benchmark/streamly-benchmarks.cabal+4
@@ -145,6 +145,10 @@ common compile-options
145 -Wno-missing-kind-signatures
145 -Wno-missing-kind-signatures
146 -Wno-operator-whitespace
146 -Wno-operator-whitespace
147
147
148+ if impl(ghc >= 9.8)
149+ ghc-options:
150+ -Wno-missing-role-annotations
151+
148 if flag(has-llvm)
152 if flag(has-llvm)
149 ghc-options: -fllvm
153 ghc-options: -fllvm
150
154
core/src/Streamly/Internal/Data/Builder.hs+2
@@ -16,7 +16,9 @@ module Streamly.Internal.Data.Builder
16 )
16 )
17where
17where
18
18
19+#if !MIN_VERSION_base(4,18,0)
19import Control.Applicative (liftA2)
20import Control.Applicative (liftA2)
21+#endif
20
22
21------------------------------------------------------------------------------
23------------------------------------------------------------------------------
22-- The Builder type
24-- The Builder type
core/src/Streamly/Internal/Data/Fold/Chunked.hs+2
@@ -58,7 +58,9 @@ where
58
58
59#include "ArrayMacros.h"
59#include "ArrayMacros.h"
60
60
61+#if !MIN_VERSION_base(4,18,0)
61import Control.Applicative (liftA2)
62import Control.Applicative (liftA2)
63+#endif
62import Control.Exception (assert)
64import Control.Exception (assert)
63import Control.Monad.IO.Class (MonadIO(..))
65import Control.Monad.IO.Class (MonadIO(..))
64import Data.Bifunctor (first)
66import Data.Bifunctor (first)
core/src/Streamly/Internal/Data/Fold/Tee.hs+2
@@ -16,7 +16,9 @@ module Streamly.Internal.Data.Fold.Tee
16 )
16 )
17where
17where
18
18
19+#if !MIN_VERSION_base(4,18,0)
19import Control.Applicative (liftA2)
20import Control.Applicative (liftA2)
21+#endif
20import Streamly.Internal.Data.Fold.Type (Fold)
22import Streamly.Internal.Data.Fold.Type (Fold)
21
23
22import qualified Streamly.Internal.Data.Fold.Type as Fold
24import qualified Streamly.Internal.Data.Fold.Type as Fold
core/src/Streamly/Internal/Data/Fold/Type.hs+2
@@ -442,7 +442,9 @@ where
442
442
443#include "inline.hs"
443#include "inline.hs"
444
444
445+#if !MIN_VERSION_base(4,18,0)
445import Control.Applicative (liftA2)
446import Control.Applicative (liftA2)
447+#endif
446import Control.Monad ((>=>))
448import Control.Monad ((>=>))
447import Data.Bifunctor (Bifunctor(..))
449import Data.Bifunctor (Bifunctor(..))
448import Data.Either (fromLeft, fromRight, isLeft, isRight)
450import Data.Either (fromLeft, fromRight, isLeft, isRight)
core/src/Streamly/Internal/Data/Parser/Type.hs+4−1
@@ -216,7 +216,10 @@ where
216#include "inline.hs"
216#include "inline.hs"
217#include "assert.hs"
217#include "assert.hs"
218
218
219+#if !MIN_VERSION_base(4,18,0)
219−import Control.Applicative (Alternative(..), liftA2)
220+import Control.Applicative (liftA2)
221+#endif
222+import Control.Applicative (Alternative(..))
220import Control.Exception (Exception(..))
223import Control.Exception (Exception(..))
221-- import Control.Monad (MonadPlus(..), (>=>))
224-- import Control.Monad (MonadPlus(..), (>=>))
222import Control.Monad ((>=>))
225import Control.Monad ((>=>))
core/src/Streamly/Internal/Data/ParserK/Type.hs+4−1
@@ -41,7 +41,10 @@ where
41#include "assert.hs"
41#include "assert.hs"
42#include "inline.hs"
42#include "inline.hs"
43
43
44+#if !MIN_VERSION_base(4,18,0)
44−import Control.Applicative (Alternative(..), liftA2)
45+import Control.Applicative (liftA2)
46+#endif
47+import Control.Applicative (Alternative(..))
45import Control.Monad (MonadPlus(..), ap)
48import Control.Monad (MonadPlus(..), ap)
46import Control.Monad.IO.Class (MonadIO, liftIO)
49import Control.Monad.IO.Class (MonadIO, liftIO)
47-- import Control.Monad.Trans.Class (MonadTrans(lift))
50-- import Control.Monad.Trans.Class (MonadTrans(lift))
core/src/Streamly/Internal/Data/Stream/Type.hs+2
@@ -136,7 +136,9 @@ where
136
136
137#include "inline.hs"
137#include "inline.hs"
138
138
139+#if !MIN_VERSION_base(4,18,0)
139import Control.Applicative (liftA2)
140import Control.Applicative (liftA2)
141+#endif
140import Control.Monad.Catch (MonadThrow, throwM)
142import Control.Monad.Catch (MonadThrow, throwM)
141import Control.Monad.Trans.Class (MonadTrans(lift))
143import Control.Monad.Trans.Class (MonadTrans(lift))
142import Control.Monad.IO.Class (MonadIO(..))
144import Control.Monad.IO.Class (MonadIO(..))
core/src/Streamly/Internal/Data/StreamK/Type.hs+2
@@ -144,7 +144,9 @@ where
144import Control.Monad ((>=>))
144import Control.Monad ((>=>))
145import Control.Monad.Catch (MonadThrow, throwM)
145import Control.Monad.Catch (MonadThrow, throwM)
146import Control.Monad.Trans.Class (MonadTrans(lift))
146import Control.Monad.Trans.Class (MonadTrans(lift))
147+#if !MIN_VERSION_base(4,18,0)
147import Control.Applicative (liftA2)
148import Control.Applicative (liftA2)
149+#endif
148import Control.Monad.IO.Class (MonadIO(..))
150import Control.Monad.IO.Class (MonadIO(..))
149import Data.Foldable (Foldable(foldl'), fold, foldr)
151import Data.Foldable (Foldable(foldl'), fold, foldr)
150import Data.Function (fix)
152import Data.Function (fix)
core/src/Streamly/Internal/Data/Time/Units.hs+2−1
@@ -1,4 +1,5 @@
1−{-# LANGUAGE TypeInType #-}
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE PolyKinds #-}
2{-# LANGUAGE UnboxedTuples #-}
3{-# LANGUAGE UnboxedTuples #-}
3
4
4-- |
5-- |
core/streamly-core.cabal+4
@@ -157,6 +157,10 @@ common compile-options
157 -Wno-redundant-bang-patterns
157 -Wno-redundant-bang-patterns
158 -Wno-operator-whitespace
158 -Wno-operator-whitespace
159
159
160+ if impl(ghc >= 9.8)
161+ ghc-options:
162+ -Wno-missing-role-annotations
163+
160 if flag(has-llvm)
164 if flag(has-llvm)
161 ghc-options: -fllvm
165 ghc-options: -fllvm
162
166
src/Streamly/Internal/Data/Stream/Zip.hs+2
@@ -27,7 +27,9 @@ module Streamly.Internal.Data.Stream.Zip
27 )
27 )
28where
28where
29
29
30+#if !MIN_VERSION_base(4,18,0)
30import Control.Applicative (liftA2)
31import Control.Applicative (liftA2)
32+#endif
31import Control.DeepSeq (NFData(..))
33import Control.DeepSeq (NFData(..))
32#if MIN_VERSION_deepseq(1,4,3)
34#if MIN_VERSION_deepseq(1,4,3)
33import Control.DeepSeq (NFData1(..))
35import Control.DeepSeq (NFData1(..))
src/Streamly/Internal/Unicode/Char.hs+4
@@ -7,6 +7,10 @@
7-- Stability : experimental
7-- Stability : experimental
8-- Portability : GHC
8-- Portability : GHC
9
9
10+-- XXX We are using head/tail at one place
11+#if __GLASGOW_HASKELL__ >= 908
12+{-# OPTIONS_GHC -Wno-x-partial #-}
13+#endif
10-- XXX This module should have the reader/writer unfold/refold and read/write
14-- XXX This module should have the reader/writer unfold/refold and read/write
11-- stream/fold routines to convert a char to/from stream.
15-- stream/fold routines to convert a char to/from stream.
12--
16--
streamly.cabal+4
@@ -266,6 +266,10 @@ common compile-options
266 -Wno-redundant-bang-patterns
266 -Wno-redundant-bang-patterns
267 -Wno-operator-whitespace
267 -Wno-operator-whitespace
268
268
269+ if impl(ghc >= 9.8)
270+ ghc-options:
271+ -Wno-missing-role-annotations
272+
269 if flag(has-llvm)
273 if flag(has-llvm)
270 ghc-options: -fllvm
274 ghc-options: -fllvm
271
275
test/Streamly/Test/Data/Parser.hs+4
@@ -1,3 +1,7 @@
1+-- XXX We are using head/tail at one place
2+#if __GLASGOW_HASKELL__ >= 908
3+{-# OPTIONS_GHC -Wno-x-partial #-}
4+#endif
1module Main (main) where
5module Main (main) where
2
6
3import Control.Applicative ((<|>))
7import Control.Applicative ((<|>))
test/Streamly/Test/Data/ParserK.hs+5
@@ -1,3 +1,8 @@
1+-- XXX We are using head/tail at one place
2+#if __GLASGOW_HASKELL__ >= 908
3+{-# OPTIONS_GHC -Wno-x-partial #-}
4+#endif
5+
1module Main (main) where
6module Main (main) where
2
7
3import Control.Applicative ((<|>))
8import Control.Applicative ((<|>))
test/Streamly/Test/Prelude/Serial.hs+4
@@ -1,5 +1,9 @@
1{-# OPTIONS_GHC -Wno-deprecations #-}
1{-# OPTIONS_GHC -Wno-deprecations #-}
2{-# Language TypeApplications #-}
2{-# Language TypeApplications #-}
3+-- XXX We are using head/tail at one place
4+#if __GLASGOW_HASKELL__ >= 908
5+{-# OPTIONS_GHC -Wno-x-partial #-}
6+#endif
3
7
4-- |
8-- |
5-- Module : Streamly.Test.Prelude.Serial
9-- Module : Streamly.Test.Prelude.Serial
test/lib/Streamly/Test/Prelude/Common.hs+8−1
@@ -1,4 +1,8 @@
1{-# OPTIONS_GHC -Wno-deprecations #-}
1{-# OPTIONS_GHC -Wno-deprecations #-}
2+-- XXX We are using head/tail at one place
3+#if __GLASGOW_HASKELL__ >= 908
4+{-# OPTIONS_GHC -Wno-x-partial #-}
5+#endif
2
6
3-- |
7-- |
4-- Module : Streamly.Test.Prelude.Common
8-- Module : Streamly.Test.Prelude.Common
@@ -85,7 +89,10 @@ module Streamly.Test.Prelude.Common
85 , sortEq
89 , sortEq
86 ) where
90 ) where
87
91
92+#if !MIN_VERSION_base(4,18,0)
88−import Control.Applicative (ZipList(..), liftA2)
93+import Control.Applicative (liftA2)
94+#endif
95+import Control.Applicative (ZipList(..))
89import Control.Exception (Exception, try)
96import Control.Exception (Exception, try)
90import Control.Concurrent (threadDelay)
97import Control.Concurrent (threadDelay)
91import Control.Monad (replicateM)
98import Control.Monad (replicateM)