mirror of
https://github.com/composewell/streamly.git
synced 2024-08-16 23:10:36 +03:00
Fix warnings for GHC 9.6 and 9.8
This commit is contained in:
parent
ac1ba5b280
commit
a11fe00965
@ -318,7 +318,7 @@ loop count f val = go count val
|
||||
-- The first arg of "f" is the environment which is not threaded around in the
|
||||
-- loop.
|
||||
{-# INLINE loopWith #-}
|
||||
loopWith :: Int -> (env -> a -> IO b) -> env -> a -> IO ()
|
||||
loopWith :: Int -> (e -> a -> IO b) -> e -> a -> IO ()
|
||||
loopWith count f e val = go count val
|
||||
where
|
||||
|
||||
|
@ -71,7 +71,9 @@ module Stream.Common
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.DeepSeq (NFData)
|
||||
import Control.Exception (try)
|
||||
import GHC.Exception (ErrorCall)
|
||||
|
@ -22,7 +22,9 @@
|
||||
|
||||
module Main (main) where
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Monad (when)
|
||||
import Data.Maybe (isJust)
|
||||
import Gauge (bench, nfIO, bgroup, Benchmark, defaultMain)
|
||||
|
@ -21,7 +21,9 @@
|
||||
|
||||
module Main (main) where
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Monad (when)
|
||||
import Data.Maybe (isJust)
|
||||
import System.Random (randomRIO)
|
||||
|
@ -145,6 +145,10 @@ common compile-options
|
||||
-Wno-missing-kind-signatures
|
||||
-Wno-operator-whitespace
|
||||
|
||||
if impl(ghc >= 9.8)
|
||||
ghc-options:
|
||||
-Wno-missing-role-annotations
|
||||
|
||||
if flag(has-llvm)
|
||||
ghc-options: -fllvm
|
||||
|
||||
|
@ -16,7 +16,9 @@ module Streamly.Internal.Data.Builder
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- The Builder type
|
||||
|
@ -58,7 +58,9 @@ where
|
||||
|
||||
#include "ArrayMacros.h"
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Exception (assert)
|
||||
import Control.Monad.IO.Class (MonadIO(..))
|
||||
import Data.Bifunctor (first)
|
||||
|
@ -16,7 +16,9 @@ module Streamly.Internal.Data.Fold.Tee
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Streamly.Internal.Data.Fold.Type (Fold)
|
||||
|
||||
import qualified Streamly.Internal.Data.Fold.Type as Fold
|
||||
|
@ -442,7 +442,9 @@ where
|
||||
|
||||
#include "inline.hs"
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Monad ((>=>))
|
||||
import Data.Bifunctor (Bifunctor(..))
|
||||
import Data.Either (fromLeft, fromRight, isLeft, isRight)
|
||||
|
@ -216,7 +216,10 @@ where
|
||||
#include "inline.hs"
|
||||
#include "assert.hs"
|
||||
|
||||
import Control.Applicative (Alternative(..), liftA2)
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Applicative (Alternative(..))
|
||||
import Control.Exception (Exception(..))
|
||||
-- import Control.Monad (MonadPlus(..), (>=>))
|
||||
import Control.Monad ((>=>))
|
||||
|
@ -41,7 +41,10 @@ where
|
||||
#include "assert.hs"
|
||||
#include "inline.hs"
|
||||
|
||||
import Control.Applicative (Alternative(..), liftA2)
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Applicative (Alternative(..))
|
||||
import Control.Monad (MonadPlus(..), ap)
|
||||
import Control.Monad.IO.Class (MonadIO, liftIO)
|
||||
-- import Control.Monad.Trans.Class (MonadTrans(lift))
|
||||
|
@ -136,7 +136,9 @@ where
|
||||
|
||||
#include "inline.hs"
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Monad.Catch (MonadThrow, throwM)
|
||||
import Control.Monad.Trans.Class (MonadTrans(lift))
|
||||
import Control.Monad.IO.Class (MonadIO(..))
|
||||
|
@ -144,7 +144,9 @@ where
|
||||
import Control.Monad ((>=>))
|
||||
import Control.Monad.Catch (MonadThrow, throwM)
|
||||
import Control.Monad.Trans.Class (MonadTrans(lift))
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Monad.IO.Class (MonadIO(..))
|
||||
import Data.Foldable (Foldable(foldl'), fold, foldr)
|
||||
import Data.Function (fix)
|
||||
|
@ -1,4 +1,5 @@
|
||||
{-# LANGUAGE TypeInType #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE PolyKinds #-}
|
||||
{-# LANGUAGE UnboxedTuples #-}
|
||||
|
||||
-- |
|
||||
|
@ -157,6 +157,10 @@ common compile-options
|
||||
-Wno-redundant-bang-patterns
|
||||
-Wno-operator-whitespace
|
||||
|
||||
if impl(ghc >= 9.8)
|
||||
ghc-options:
|
||||
-Wno-missing-role-annotations
|
||||
|
||||
if flag(has-llvm)
|
||||
ghc-options: -fllvm
|
||||
|
||||
|
@ -27,7 +27,9 @@ module Streamly.Internal.Data.Stream.Zip
|
||||
)
|
||||
where
|
||||
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.DeepSeq (NFData(..))
|
||||
#if MIN_VERSION_deepseq(1,4,3)
|
||||
import Control.DeepSeq (NFData1(..))
|
||||
|
@ -7,6 +7,10 @@
|
||||
-- Stability : experimental
|
||||
-- Portability : GHC
|
||||
|
||||
-- XXX We are using head/tail at one place
|
||||
#if __GLASGOW_HASKELL__ >= 908
|
||||
{-# OPTIONS_GHC -Wno-x-partial #-}
|
||||
#endif
|
||||
-- XXX This module should have the reader/writer unfold/refold and read/write
|
||||
-- stream/fold routines to convert a char to/from stream.
|
||||
--
|
||||
|
@ -266,6 +266,10 @@ common compile-options
|
||||
-Wno-redundant-bang-patterns
|
||||
-Wno-operator-whitespace
|
||||
|
||||
if impl(ghc >= 9.8)
|
||||
ghc-options:
|
||||
-Wno-missing-role-annotations
|
||||
|
||||
if flag(has-llvm)
|
||||
ghc-options: -fllvm
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
-- XXX We are using head/tail at one place
|
||||
#if __GLASGOW_HASKELL__ >= 908
|
||||
{-# OPTIONS_GHC -Wno-x-partial #-}
|
||||
#endif
|
||||
module Main (main) where
|
||||
|
||||
import Control.Applicative ((<|>))
|
||||
|
@ -1,3 +1,8 @@
|
||||
-- XXX We are using head/tail at one place
|
||||
#if __GLASGOW_HASKELL__ >= 908
|
||||
{-# OPTIONS_GHC -Wno-x-partial #-}
|
||||
#endif
|
||||
|
||||
module Main (main) where
|
||||
|
||||
import Control.Applicative ((<|>))
|
||||
|
@ -1,5 +1,9 @@
|
||||
{-# OPTIONS_GHC -Wno-deprecations #-}
|
||||
{-# Language TypeApplications #-}
|
||||
-- XXX We are using head/tail at one place
|
||||
#if __GLASGOW_HASKELL__ >= 908
|
||||
{-# OPTIONS_GHC -Wno-x-partial #-}
|
||||
#endif
|
||||
|
||||
-- |
|
||||
-- Module : Streamly.Test.Prelude.Serial
|
||||
|
@ -1,4 +1,8 @@
|
||||
{-# OPTIONS_GHC -Wno-deprecations #-}
|
||||
-- XXX We are using head/tail at one place
|
||||
#if __GLASGOW_HASKELL__ >= 908
|
||||
{-# OPTIONS_GHC -Wno-x-partial #-}
|
||||
#endif
|
||||
|
||||
-- |
|
||||
-- Module : Streamly.Test.Prelude.Common
|
||||
@ -85,7 +89,10 @@ module Streamly.Test.Prelude.Common
|
||||
, sortEq
|
||||
) where
|
||||
|
||||
import Control.Applicative (ZipList(..), liftA2)
|
||||
#if !MIN_VERSION_base(4,18,0)
|
||||
import Control.Applicative (liftA2)
|
||||
#endif
|
||||
import Control.Applicative (ZipList(..))
|
||||
import Control.Exception (Exception, try)
|
||||
import Control.Concurrent (threadDelay)
|
||||
import Control.Monad (replicateM)
|
||||
|
Loading…
Reference in New Issue
Block a user