on master help sign in
Skip building Array.Prim.* modules for ghc < 8.0

getSizeofMutableByteArray# does not exist for versions of ghc below 8

commitef7c6d96333195c45b11513069654353d41662e4 authoradithyaov <adi.obilisetty@gmail.com> dateTue 21 Jul 2020, 00:50 (6 years ago) parent4d0631a
2 files changed+22−11
benchmark/streamly-benchmarks.cabal+4 streamly.cabal+18−11
benchmark/streamly-benchmarks.cabal+4
@@ -395,6 +395,8 @@ benchmark Data.Array.Prim
395395 other-modules: Streamly.Benchmark.Data.ArrayOps
396396 cpp-options: -DDATA_ARRAY_PRIM
397397 build-depends: primitive
398+ if impl(ghc < 8.0)
399+ buildable: False
398400
399401benchmark Data.SmallArray
400402 import: bench-options
@@ -411,6 +413,8 @@ benchmark Data.Array.Prim.Pinned
411413 main-is: Streamly/Benchmark/Data/Array.hs
412414 other-modules: Streamly.Benchmark.Data.ArrayOps
413415 cpp-options: -DDATA_ARRAY_PRIM_PINNED
416+ if impl(ghc < 8.0)
417+ buildable: False
414418
415419benchmark Memory.Array
416420 import: bench-options
streamly.cabal+18−11
@@ -342,7 +342,6 @@ library
342342 other-modules:
343343 Streamly.Data.Array
344344 , Streamly.Data.SmallArray
345− , Streamly.Data.Prim.Array
346345
347346 -- Memory storage
348347 Streamly.Memory.Malloc
@@ -381,12 +380,6 @@ library
381380
382381 -- Arrays
383382 , Streamly.Internal.Data.Array
384− , Streamly.Internal.Data.Array.Prim.Types
385− , Streamly.Internal.Data.Array.Prim
386− , Streamly.Internal.Data.Array.Prim.Mut.Types
387− , Streamly.Internal.Data.Array.Prim.Pinned.Types
388− , Streamly.Internal.Data.Array.Prim.Pinned
389− , Streamly.Internal.Data.Array.Prim.Pinned.Mut.Types
390383 , Streamly.Internal.Data.SmallArray.Types
391384 , Streamly.Internal.Data.SmallArray
392385 , Streamly.Internal.Memory.Mutable.Array.Types
@@ -446,8 +439,24 @@ library
446439 , Streamly.Internal.Data.Unicode.Stream
447440 , Streamly.Internal.Data.Unicode.Char
448441 , Streamly.Internal.Memory.Unicode.Array
442+
443+ if impl(ghc >= 8.0)
444+ other-modules: Streamly.Data.Prim.Array
445+
446+ if impl(ghc >= 8.0)
447+ exposed-modules:
448+ -- Arrays
449+ Streamly.Internal.Data.Array.Prim.Types
450+ , Streamly.Internal.Data.Array.Prim
451+ , Streamly.Internal.Data.Array.Prim.Mut.Types
452+ , Streamly.Internal.Data.Array.Prim.Pinned.Types
453+ , Streamly.Internal.Data.Array.Prim.Pinned
454+ , Streamly.Internal.Data.Array.Prim.Pinned.Mut.Types
455+
456+ -- Text Processing
449457 , Streamly.Internal.Unicode.Array.Prim.Pinned
450458
459+
451460 if !impl(ghcjs)
452461 exposed-modules:
453462 Streamly.Network.Socket
@@ -675,8 +684,7 @@ test-suite primarray-test
675684 , QuickCheck >= 2.10 && < 2.15
676685 , hspec >= 2.0 && < 3
677686 if impl(ghc < 8.0)
678− build-depends:
679− transformers >= 0.4 && < 0.6
687+ buildable: False
680688 default-language: Haskell2010
681689
682690test-suite prim-pinned-array-test
@@ -692,8 +700,7 @@ test-suite prim-pinned-array-test
692700 , QuickCheck >= 2.10 && < 2.15
693701 , hspec >= 2.0 && < 3
694702 if impl(ghc < 8.0)
695− build-depends:
696− transformers >= 0.4 && < 0.6
703+ buildable: False
697704 default-language: Haskell2010
698705
699706test-suite string-test