Rename Data.Stream.Async to Data.Stream.Concurrent (#1926)

This commit is contained in:
Ranjeet Ranjan 2022-10-11 16:41:45 +05:30 committed by GitHub
parent edc9d3ad8f
commit 7ac9ab7d5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 61 additions and 61 deletions

View File

@ -28,7 +28,7 @@ jobs:
Data.Stream.StreamK:6
Data.Unfold
Data.Stream
Data.Stream.Async
Data.Stream.Concurrent
FileSystem.Handle
Prelude.Ahead
Prelude.Async:12

View File

@ -10,7 +10,7 @@ import Stream.AsyncCommon (allBenchmarks, interleaveBenchmarks)
import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
moduleName :: String
moduleName = "Data.Stream.Async"
moduleName = "Data.Stream.Concurrent"
-------------------------------------------------------------------------------
-- Main

View File

@ -15,12 +15,12 @@ where
import Stream.Common
(composeN, benchIO, benchIOSink, benchIOSrc, sourceUnfoldrM)
import Streamly.Data.Stream (Stream)
import Streamly.Internal.Data.Stream.Async (MonadAsync, Config)
import Streamly.Internal.Data.Stream.Concurrent (MonadAsync, Config)
import qualified Data.List as List
import qualified Streamly.Data.Fold as Fold
import qualified Streamly.Data.Stream as Stream
import qualified Streamly.Internal.Data.Stream.Async as Async
import qualified Streamly.Internal.Data.Stream.Concurrent as Async
import Gauge
import Prelude hiding (mapM)

View File

@ -9,7 +9,7 @@
import Stream.AsyncCommon (allBenchmarks)
import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
import qualified Streamly.Internal.Data.Stream.Async as Async
import qualified Streamly.Internal.Data.Stream.Concurrent as Async
moduleName :: String
moduleName = "Data.Stream.AsyncEager"

View File

@ -9,7 +9,7 @@
import Stream.AsyncCommon (allBenchmarks)
import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
import qualified Streamly.Internal.Data.Stream.Async as Async
import qualified Streamly.Internal.Data.Stream.Concurrent as Async
moduleName :: String
moduleName = "Data.Stream.AsyncOrdered"

View File

@ -41,9 +41,9 @@ cradle:
- path: "./benchmark/Streamly/Benchmark/Data/Stream/Transform.hs"
component: "bench:Data.Stream"
- path: "./benchmark/Streamly/Benchmark/Data/Stream/Async.hs"
component: "bench:Data.Stream.Async"
component: "bench:Data.Stream.Concurrent"
- path: "./benchmark/Streamly/Benchmark/Data/Stream/AsyncCommon.hs"
component: "bench:Data.Stream.Async"
component: "bench:Data.Stream.Concurrent"
- path: "./benchmark/Streamly/Benchmark/Data/Stream/AsyncEager.hs"
component: "bench:Data.Stream.AsyncEager"
- path: "./benchmark/Streamly/Benchmark/Data/Unfold.hs"
@ -90,10 +90,10 @@ cradle:
component: "test:Data.List"
- path: "./test/Streamly/Test/Data/Parser.hs"
component: "test:Data.Parser"
- path: "./test/Streamly/Test/Data/Stream/Async.hs"
component: "test:Data.Stream.Async"
- path: "./test/Streamly/Test/Data/Stream/Concurrent.hs"
component: "test:Data.Stream.Concurrent"
- path: "./test/Streamly/Test/Data/Stream/Common.hs"
component: "test:Data.Stream.Async"
component: "test:Data.Stream.Concurrent"
- path: "./test/Streamly/Test/Data/Parser/ParserD.hs"
component: "test:Data.Parser.ParserD"
- path: "./test/Streamly/Test/Data/Unfold.hs"

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel.Worker
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Worker
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async
-- Module : Streamly.Internal.Data.Stream.Concurrent
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
@ -16,7 +16,7 @@
-- Common Channel functionality to Data.Channel.
-- Stream channel to Data.Stream.Channel.
module Streamly.Internal.Data.Stream.Async
module Streamly.Internal.Data.Stream.Concurrent
(
-- * Imports
-- $setup
@ -79,7 +79,7 @@ import Streamly.Internal.Data.Stream.Type (Stream)
import qualified Streamly.Internal.Data.Stream as Stream
import Streamly.Internal.Data.Stream.Async.Channel
import Streamly.Internal.Data.Stream.Concurrent.Channel
import Prelude hiding (mapM, sequence, concat, concatMap)
-- $setup
@ -92,7 +92,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap)
-- >>> import qualified Streamly.Data.Fold as Fold
-- >>> import qualified Streamly.Data.Parser as Parser
-- >>> import qualified Streamly.Data.Stream as Stream
-- >>> import qualified Streamly.Internal.Data.Stream.Async as Async
-- >>> import qualified Streamly.Internal.Data.Stream.Concurrent as Async
-- >>> import Prelude hiding (concatMap, concat)
-- >>> :{
-- delay n = do

View File

@ -1,12 +1,12 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
module Streamly.Internal.Data.Stream.Async.Channel
module Streamly.Internal.Data.Stream.Concurrent.Channel
(
-- * Channel
Channel
@ -47,16 +47,16 @@ where
import Control.Monad.IO.Class (MonadIO(liftIO))
import Streamly.Internal.Control.Concurrent (MonadAsync, askRunInIO)
import Streamly.Internal.Data.Stream.Async.Channel.Operations
import Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
(fromChannel, fromChannelK, toChannel, toChannelK)
import qualified Streamly.Internal.Data.Stream as Stream
import qualified Streamly.Internal.Data.Stream.Async.Channel.Append as Append
import qualified Streamly.Internal.Data.Stream.Async.Channel.Interleave
import qualified Streamly.Internal.Data.Stream.Concurrent.Channel.Append as Append
import qualified Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
as Interleave
import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
import Streamly.Internal.Data.Stream.Async.Channel.Type
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Stream.Channel.Types
-- | Allocate a channel and evaluate the stream using the channel and the

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel.Append
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Append
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
@ -13,7 +13,7 @@
-- use INLINABLE and SPECIALIZE on it which makes it specialized but it is not
-- actually inlined.
module Streamly.Internal.Data.Stream.Async.Channel.Append
module Streamly.Internal.Data.Stream.Concurrent.Channel.Append
(
newChannel
)
@ -39,9 +39,9 @@ import qualified Data.Heap as H
import qualified Data.Set as Set
import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
import Streamly.Internal.Data.Stream.Async.Channel.Consumer
import Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Async.Channel.Type
import Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Stream.Channel.Types
import Streamly.Internal.Data.Stream.Channel.Worker

View File

@ -1,12 +1,12 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel.Consumer
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
--
module Streamly.Internal.Data.Stream.Async.Channel.Consumer
module Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
(
-- * Read Output
readOutputQPaced
@ -23,8 +23,8 @@ import Control.Monad (when, void)
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.IORef (readIORef)
import Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Async.Channel.Type
import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Stream.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Channel.Types

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
@ -7,7 +7,7 @@
-- Portability : GHC
--
--
module Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
module Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
(
-- * Dispatching
pushWorker
@ -33,7 +33,7 @@ import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
import Streamly.Internal.Data.Time.Units
(MicroSecond64(..), diffAbsTime64, fromRelTime64, toRelTime64)
import Streamly.Internal.Data.Stream.Async.Channel.Type
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Stream.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Channel.Types
import Streamly.Internal.Data.Stream.Channel.Worker

View File

@ -1,12 +1,12 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel.Interleave
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
module Streamly.Internal.Data.Stream.Async.Channel.Interleave
module Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
(
newChannel
)
@ -27,8 +27,8 @@ import Streamly.Internal.Data.Stream.Channel.Dispatcher (delThread)
import qualified Data.Set as Set
import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
import Streamly.Internal.Data.Stream.Async.Channel.Consumer
import Streamly.Internal.Data.Stream.Async.Channel.Type
import Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Stream.Channel.Types
------------------------------------------------------------------------------

View File

@ -8,14 +8,14 @@
#endif
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel.Operations
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
module Streamly.Internal.Data.Stream.Async.Channel.Operations
module Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
(
toChannel
, toChannelK
@ -42,8 +42,8 @@ import qualified Streamly.Internal.Data.Stream as Stream
import qualified Streamly.Internal.Data.Stream.StreamD.Type as D
import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
import Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Async.Channel.Type
import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Stream.Channel.Types
import Prelude hiding (map, concat, concatMap)

View File

@ -1,12 +1,12 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Async.Channel.Type
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Type
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
module Streamly.Internal.Data.Stream.Async.Channel.Type
module Streamly.Internal.Data.Stream.Concurrent.Channel.Type
(
Channel(..)
, yield

View File

@ -96,7 +96,7 @@ extra-source-files:
test/Streamly/Test/Data/Ring/Unboxed.hs
test/Streamly/Test/Data/Array/Stream/Unboxed.hs
test/Streamly/Test/Data/Parser/ParserD.hs
test/Streamly/Test/Data/Stream/Async.hs
test/Streamly/Test/Data/Stream/Concurrent.hs
test/Streamly/Test/FileSystem/Event.hs
test/Streamly/Test/FileSystem/Event/Common.hs
test/Streamly/Test/FileSystem/Event/Darwin.hs
@ -464,14 +464,14 @@ library
, Streamly.Internal.Data.Stream.Channel.Dispatcher
, Streamly.Internal.Data.Stream.Channel.Worker
, Streamly.Internal.Data.Stream.Async.Channel.Type
, Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
, Streamly.Internal.Data.Stream.Async.Channel.Consumer
, Streamly.Internal.Data.Stream.Async.Channel.Append
, Streamly.Internal.Data.Stream.Async.Channel.Interleave
, Streamly.Internal.Data.Stream.Async.Channel.Operations
, Streamly.Internal.Data.Stream.Async.Channel
, Streamly.Internal.Data.Stream.Async
, Streamly.Internal.Data.Stream.Concurrent.Channel.Type
, Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
, Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
, Streamly.Internal.Data.Stream.Concurrent.Channel.Append
, Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
, Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
, Streamly.Internal.Data.Stream.Concurrent.Channel
, Streamly.Internal.Data.Stream.Concurrent
, Streamly.Internal.Data.Stream.Ahead
, Streamly.Internal.Data.Stream.ZipAsync

View File

@ -27,7 +27,7 @@ targets =
, "serial_async_cmp"
]
)
, ("Data.Stream.Async",
, ("Data.Stream.Concurrent",
[ "prelude_concurrent_grp"
, "infinite_grp"
, "concurrent_cmp"

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Test.Data.Stream.Async
-- Module : Streamly.Test.Data.Stream.Concurrent
-- Copyright : (c) 2020 Composewell Technologies
--
-- License : BSD-3-Clause
@ -7,7 +7,7 @@
-- Stability : experimental
-- Portability : GHC
module Streamly.Test.Data.Stream.Async (main) where
module Streamly.Test.Data.Stream.Concurrent (main) where
#ifdef DEVBUILD
import Control.Concurrent (threadDelay)
@ -25,12 +25,12 @@ import Test.Hspec as H
import qualified Streamly.Data.Fold as Fold
import qualified Streamly.Data.Stream as Stream
import qualified Streamly.Internal.Data.Stream.Async as Async
import qualified Streamly.Internal.Data.Stream.Concurrent as Async
import Streamly.Test.Common (listEquals)
moduleName :: String
moduleName = "Data.Stream.Async"
moduleName = "Data.Stream.Concurrent"
-------------------------------------------------------------------------------
-- Utilities

View File

@ -389,11 +389,11 @@ test-suite Prelude.Async
if flag(use-streamly-core)
buildable: False
test-suite Data.Stream.Async
test-suite Data.Stream.Concurrent
import: test-options
type: exitcode-stdio-1.0
main-is: Streamly/Test/Data/Stream/Async.hs
ghc-options: -main-is Streamly.Test.Data.Stream.Async.main
main-is: Streamly/Test/Data/Stream/Concurrent.hs
ghc-options: -main-is Streamly.Test.Data.Stream.Concurrent.main
if flag(use-streamly-core)
buildable: False