on master help sign in
Make it build for GHC-9.0
ca29fd2Harendra Kumar
benchmark/streamly-benchmarks.cabal+1−1
@@ -113,7 +113,7 @@ common bench-depends
113 , containers >= 0.5 && < 0.7
113 , containers >= 0.5 && < 0.7
114 , typed-process >= 0.2.3 && < 0.3
114 , typed-process >= 0.2.3 && < 0.3
115 , directory >= 1.2.2 && < 1.4
115 , directory >= 1.2.2 && < 1.4
116− , ghc-prim >= 0.4 && < 0.7
116+ , ghc-prim >= 0.4 && < 0.8
117
117
118 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
118 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
119 build-depends:
119 build-depends:
docs/Build.md+3
@@ -5,6 +5,9 @@ For best performance use GHC 8.10 or 8.8 along with `fusion-plugin`
5(see below). Benchmarks show that GHC 8.8 has significantly better
5(see below). Benchmarks show that GHC 8.8 has significantly better
6performance than GHC 8.6 in many cases.
6performance than GHC 8.6 in many cases.
7
7
8+Please do not use GHC 9.0 for sensitive applications, initial
9+evaluations have shown severe perf regressions with GHC 9.0.
10+
8GHC versions 8.6 onwards are fully supported along with `fusion-plugin`.
11GHC versions 8.6 onwards are fully supported along with `fusion-plugin`.
9`fusion-plugin` is not supported for GHC versions below 8.6.
12`fusion-plugin` is not supported for GHC versions below 8.6.
10
13
src/Streamly/Internal/FileSystem/FD.hs+8
@@ -217,7 +217,11 @@ readArrayUpto size (Handle fd) = do
217 -- ptr <- mallocPlainForeignPtrAlignedBytes size (alignment (undefined :: Word8))
217 -- ptr <- mallocPlainForeignPtrAlignedBytes size (alignment (undefined :: Word8))
218 withForeignPtr ptr $ \p -> do
218 withForeignPtr ptr $ \p -> do
219 -- n <- hGetBufSome h p size
219 -- n <- hGetBufSome h p size
220+#if MIN_VERSION_base(4,15,0)
221+ n <- RawIO.read fd p 0 size
222+#else
220 n <- RawIO.read fd p size
223 n <- RawIO.read fd p size
224+#endif
221 -- XXX shrink only if the diff is significant
225 -- XXX shrink only if the diff is significant
222 -- Use unsafeFreezeWithShrink
226 -- Use unsafeFreezeWithShrink
223 return $
227 return $
@@ -235,7 +239,11 @@ writeArray :: Storable a => Handle -> Array a -> IO ()
235writeArray _ arr | A.length arr == 0 = return ()
239writeArray _ arr | A.length arr == 0 = return ()
236writeArray (Handle fd) arr = withForeignPtr (aStart arr) $ \p ->
240writeArray (Handle fd) arr = withForeignPtr (aStart arr) $ \p ->
237 -- RawIO.writeAll fd (castPtr p) aLen
241 -- RawIO.writeAll fd (castPtr p) aLen
242+#if MIN_VERSION_base(4,15,0)
243+ RawIO.write fd (castPtr p) 0 aLen
244+#else
238 RawIO.write fd (castPtr p) aLen
245 RawIO.write fd (castPtr p) aLen
246+#endif
239 {-
247 {-
240 -- Experiment to compare "writev" based IO with "write" based IO.
248 -- Experiment to compare "writev" based IO with "write" based IO.
241 iov <- A.newArray 1
249 iov <- A.newArray 1
streamly.cabal+2−2
@@ -552,12 +552,12 @@ library
552 , deepseq >= 1.4.1 && < 1.5
552 , deepseq >= 1.4.1 && < 1.5
553 , directory >= 1.2.2 && < 1.4
553 , directory >= 1.2.2 && < 1.4
554 , exceptions >= 0.8 && < 0.11
554 , exceptions >= 0.8 && < 0.11
555− , ghc-prim >= 0.2 && < 0.7
555+ , ghc-prim >= 0.2 && < 0.8
556 , mtl >= 2.2 && < 3
556 , mtl >= 2.2 && < 3
557 , primitive >= 0.5.4 && < 0.8
557 , primitive >= 0.5.4 && < 0.8
558 , transformers >= 0.4 && < 0.6
558 , transformers >= 0.4 && < 0.6
559
559
560− , heaps >= 0.3 && < 0.4
560+ , heaps >= 0.3 && < 0.5
561
561
562 -- concurrency
562 -- concurrency
563 , atomic-primops >= 0.8 && < 0.9
563 , atomic-primops >= 0.8 && < 0.9
test/lib/Streamly/Test/Prelude/Common.hs+1−5
@@ -1081,11 +1081,7 @@ transformCombineFromList constr eq listOp t op a b c =
1081-- transformCombineOpsOrdered work only for ordered stream types i.e. excluding
1081-- transformCombineOpsOrdered work only for ordered stream types i.e. excluding
1082-- the Async type.
1082-- the Async type.
1083transformCombineOpsCommon
1083transformCombineOpsCommon
1084− :: (IsStream t, Semigroup (t IO Int)
1084+ :: (IsStream t, Semigroup (t IO Int) , Functor (t IO))
1085−#if __GLASGOW_HASKELL__ < 806
1086− , Functor (t IO)
1087−#endif
1088− )
1089 => ([Int] -> t IO Int)
1085 => ([Int] -> t IO Int)
1090 -> String
1086 -> String
1091 -> ([Int] -> [Int] -> Bool)
1087 -> ([Int] -> [Int] -> Bool)