on master help sign in
Rename Data.Stream.Async to Data.Stream.Concurrent (#1926)
commit7ac9ab7d5b969fc22a16e795004ac8ac85f0b6ff authorRanjeet Ranjan <ranjeetr@composewell.com> dateTue 11 Oct 2022, 16:41 (4 years ago) parentedc9d3a
19 files changed+61−61
.github/workflows/regression-check.yml+1−1 benchmark/Streamly/Benchmark/Data/Stream/Async.hs+1−1 benchmark/Streamly/Benchmark/Data/Stream/AsyncCommon.hs+2−2 benchmark/Streamly/Benchmark/Data/Stream/AsyncEager.hs+1−1 benchmark/Streamly/Benchmark/Data/Stream/AsyncOrdered.hs+1−1 hie.yaml+5−5 src/Streamly/Internal/Data/Stream/Channel/Worker.hs+1−1 src/Streamly/Internal/Data/Stream/Async.hs → src/Streamly/Internal/Data/Stream/Concurrent.hs+4−4 src/Streamly/Internal/Data/Stream/Async/Channel.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel.hs+6−6 src/Streamly/Internal/Data/Stream/Async/Channel/Append.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Append.hs+5−5 src/Streamly/Internal/Data/Stream/Async/Channel/Consumer.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Consumer.hs+4−4 src/Streamly/Internal/Data/Stream/Async/Channel/Dispatcher.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Dispatcher.hs+3−3 src/Streamly/Internal/Data/Stream/Async/Channel/Interleave.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Interleave.hs+4−4 src/Streamly/Internal/Data/Stream/Async/Channel/Operations.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Operations.hs+4−4 src/Streamly/Internal/Data/Stream/Async/Channel/Type.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Type.hs+2−2 streamly.cabal+9−9 targets/Targets.hs+1−1 test/Streamly/Test/Data/Stream/Async.hs → test/Streamly/Test/Data/Stream/Concurrent.hs+4−4 test/streamly-tests.cabal+3−3
.github/workflows/regression-check.yml+1−1
@@ -28,7 +28,7 @@ jobs:
2828 Data.Stream.StreamK:6
2929 Data.Unfold
3030 Data.Stream
31− Data.Stream.Async
31+ Data.Stream.Concurrent
3232 FileSystem.Handle
3333 Prelude.Ahead
3434 Prelude.Async:12
benchmark/Streamly/Benchmark/Data/Stream/Async.hs+1−1
@@ -10,7 +10,7 @@ import Stream.AsyncCommon (allBenchmarks, interleaveBenchmarks)
1010import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
1111
1212moduleName :: String
13−moduleName = "Data.Stream.Async"
13+moduleName = "Data.Stream.Concurrent"
1414
1515-------------------------------------------------------------------------------
1616-- Main
benchmark/Streamly/Benchmark/Data/Stream/AsyncCommon.hs+2−2
@@ -15,12 +15,12 @@ where
1515import Stream.Common
1616 (composeN, benchIO, benchIOSink, benchIOSrc, sourceUnfoldrM)
1717import Streamly.Data.Stream (Stream)
18−import Streamly.Internal.Data.Stream.Async (MonadAsync, Config)
18+import Streamly.Internal.Data.Stream.Concurrent (MonadAsync, Config)
1919
2020import qualified Data.List as List
2121import qualified Streamly.Data.Fold as Fold
2222import qualified Streamly.Data.Stream as Stream
23−import qualified Streamly.Internal.Data.Stream.Async as Async
23+import qualified Streamly.Internal.Data.Stream.Concurrent as Async
2424
2525import Gauge
2626import Prelude hiding (mapM)
benchmark/Streamly/Benchmark/Data/Stream/AsyncEager.hs+1−1
@@ -9,7 +9,7 @@
99import Stream.AsyncCommon (allBenchmarks)
1010import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
1111
12−import qualified Streamly.Internal.Data.Stream.Async as Async
12+import qualified Streamly.Internal.Data.Stream.Concurrent as Async
1313
1414moduleName :: String
1515moduleName = "Data.Stream.AsyncEager"
benchmark/Streamly/Benchmark/Data/Stream/AsyncOrdered.hs+1−1
@@ -9,7 +9,7 @@
99import Stream.AsyncCommon (allBenchmarks)
1010import Streamly.Benchmark.Common (runWithCLIOpts, defaultStreamSize)
1111
12−import qualified Streamly.Internal.Data.Stream.Async as Async
12+import qualified Streamly.Internal.Data.Stream.Concurrent as Async
1313
1414moduleName :: String
1515moduleName = "Data.Stream.AsyncOrdered"
hie.yaml+5−5
@@ -41,9 +41,9 @@ cradle:
4141 - path: "./benchmark/Streamly/Benchmark/Data/Stream/Transform.hs"
4242 component: "bench:Data.Stream"
4343 - path: "./benchmark/Streamly/Benchmark/Data/Stream/Async.hs"
44− component: "bench:Data.Stream.Async"
44+ component: "bench:Data.Stream.Concurrent"
4545 - path: "./benchmark/Streamly/Benchmark/Data/Stream/AsyncCommon.hs"
46− component: "bench:Data.Stream.Async"
46+ component: "bench:Data.Stream.Concurrent"
4747 - path: "./benchmark/Streamly/Benchmark/Data/Stream/AsyncEager.hs"
4848 component: "bench:Data.Stream.AsyncEager"
4949 - path: "./benchmark/Streamly/Benchmark/Data/Unfold.hs"
@@ -90,10 +90,10 @@ cradle:
9090 component: "test:Data.List"
9191 - path: "./test/Streamly/Test/Data/Parser.hs"
9292 component: "test:Data.Parser"
93− - path: "./test/Streamly/Test/Data/Stream/Async.hs"
94− component: "test:Data.Stream.Async"
93+ - path: "./test/Streamly/Test/Data/Stream/Concurrent.hs"
94+ component: "test:Data.Stream.Concurrent"
9595 - path: "./test/Streamly/Test/Data/Stream/Common.hs"
96− component: "test:Data.Stream.Async"
96+ component: "test:Data.Stream.Concurrent"
9797 - path: "./test/Streamly/Test/Data/Parser/ParserD.hs"
9898 component: "test:Data.Parser.ParserD"
9999 - path: "./test/Streamly/Test/Data/Unfold.hs"
src/Streamly/Internal/Data/Stream/Channel/Worker.hs+1−1
@@ -1,5 +1,5 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async.Channel.Worker
2+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Worker
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
src/Streamly/Internal/Data/Stream/Async.hs → src/Streamly/Internal/Data/Stream/Concurrent.hsrenamed+4−4
@@ -1,5 +1,5 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async
2+-- Module : Streamly.Internal.Data.Stream.Concurrent
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
@@ -16,7 +16,7 @@
1616-- Common Channel functionality to Data.Channel.
1717-- Stream channel to Data.Stream.Channel.
1818
19−module Streamly.Internal.Data.Stream.Async
19+module Streamly.Internal.Data.Stream.Concurrent
2020 (
2121 -- * Imports
2222 -- $setup
@@ -79,7 +79,7 @@ import Streamly.Internal.Data.Stream.Type (Stream)
7979
8080import qualified Streamly.Internal.Data.Stream as Stream
8181
82−import Streamly.Internal.Data.Stream.Async.Channel
82+import Streamly.Internal.Data.Stream.Concurrent.Channel
8383import Prelude hiding (mapM, sequence, concat, concatMap)
8484
8585-- $setup
@@ -92,7 +92,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap)
9292-- >>> import qualified Streamly.Data.Fold as Fold
9393-- >>> import qualified Streamly.Data.Parser as Parser
9494-- >>> import qualified Streamly.Data.Stream as Stream
95−-- >>> import qualified Streamly.Internal.Data.Stream.Async as Async
95+-- >>> import qualified Streamly.Internal.Data.Stream.Concurrent as Async
9696-- >>> import Prelude hiding (concatMap, concat)
9797-- >>> :{
9898-- delay n = do
src/Streamly/Internal/Data/Stream/Async/Channel.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel.hsrenamed+6−6
@@ -1,12 +1,12 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async.Channel
2+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
66-- Stability : experimental
77-- Portability : GHC
88
9−module Streamly.Internal.Data.Stream.Async.Channel
9+module Streamly.Internal.Data.Stream.Concurrent.Channel
1010 (
1111 -- * Channel
1212 Channel
@@ -47,16 +47,16 @@ where
4747
4848import Control.Monad.IO.Class (MonadIO(liftIO))
4949import Streamly.Internal.Control.Concurrent (MonadAsync, askRunInIO)
50−import Streamly.Internal.Data.Stream.Async.Channel.Operations
50+import Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
5151 (fromChannel, fromChannelK, toChannel, toChannelK)
5252
5353import qualified Streamly.Internal.Data.Stream as Stream
54−import qualified Streamly.Internal.Data.Stream.Async.Channel.Append as Append
55−import qualified Streamly.Internal.Data.Stream.Async.Channel.Interleave
54+import qualified Streamly.Internal.Data.Stream.Concurrent.Channel.Append as Append
55+import qualified Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
5656 as Interleave
5757import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
5858
59−import Streamly.Internal.Data.Stream.Async.Channel.Type
59+import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
6060import Streamly.Internal.Data.Stream.Channel.Types
6161
6262-- | Allocate a channel and evaluate the stream using the channel and the
src/Streamly/Internal/Data/Stream/Async/Channel/Append.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Append.hsrenamed+5−5
@@ -1,5 +1,5 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async.Channel.Append
2+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Append
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
@@ -13,7 +13,7 @@
1313-- use INLINABLE and SPECIALIZE on it which makes it specialized but it is not
1414-- actually inlined.
1515
16−module Streamly.Internal.Data.Stream.Async.Channel.Append
16+module Streamly.Internal.Data.Stream.Concurrent.Channel.Append
1717 (
1818 newChannel
1919 )
@@ -39,9 +39,9 @@ import qualified Data.Heap as H
3939import qualified Data.Set as Set
4040import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
4141
42−import Streamly.Internal.Data.Stream.Async.Channel.Consumer
43−import Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
44−import Streamly.Internal.Data.Stream.Async.Channel.Type
42+import Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
43+import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
44+import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
4545import Streamly.Internal.Data.Stream.Channel.Types
4646import Streamly.Internal.Data.Stream.Channel.Worker
4747
src/Streamly/Internal/Data/Stream/Async/Channel/Consumer.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Consumer.hsrenamed+4−4
@@ -1,12 +1,12 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async.Channel.Consumer
2+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
66-- Stability : experimental
77-- Portability : GHC
88--
9−module Streamly.Internal.Data.Stream.Async.Channel.Consumer
9+module Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
1010 (
1111 -- * Read Output
1212 readOutputQPaced
@@ -23,8 +23,8 @@ import Control.Monad (when, void)
2323import Control.Monad.IO.Class (MonadIO(liftIO))
2424import Data.IORef (readIORef)
2525
26−import Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
27−import Streamly.Internal.Data.Stream.Async.Channel.Type
26+import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
27+import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
2828import Streamly.Internal.Data.Stream.Channel.Dispatcher
2929import Streamly.Internal.Data.Stream.Channel.Types
3030
src/Streamly/Internal/Data/Stream/Async/Channel/Dispatcher.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Dispatcher.hsrenamed+3−3
@@ -1,5 +1,5 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
2+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
@@ -7,7 +7,7 @@
77-- Portability : GHC
88--
99--
10−module Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
10+module Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
1111 (
1212 -- * Dispatching
1313 pushWorker
@@ -33,7 +33,7 @@ import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
3333import Streamly.Internal.Data.Time.Units
3434 (MicroSecond64(..), diffAbsTime64, fromRelTime64, toRelTime64)
3535
36−import Streamly.Internal.Data.Stream.Async.Channel.Type
36+import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
3737import Streamly.Internal.Data.Stream.Channel.Dispatcher
3838import Streamly.Internal.Data.Stream.Channel.Types
3939import Streamly.Internal.Data.Stream.Channel.Worker
src/Streamly/Internal/Data/Stream/Async/Channel/Interleave.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Interleave.hsrenamed+4−4
@@ -1,12 +1,12 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async.Channel.Interleave
2+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
66-- Stability : experimental
77-- Portability : GHC
88
9−module Streamly.Internal.Data.Stream.Async.Channel.Interleave
9+module Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
1010 (
1111 newChannel
1212 )
@@ -27,8 +27,8 @@ import Streamly.Internal.Data.Stream.Channel.Dispatcher (delThread)
2727import qualified Data.Set as Set
2828import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
2929
30−import Streamly.Internal.Data.Stream.Async.Channel.Consumer
31−import Streamly.Internal.Data.Stream.Async.Channel.Type
30+import Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
31+import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
3232import Streamly.Internal.Data.Stream.Channel.Types
3333
3434------------------------------------------------------------------------------
src/Streamly/Internal/Data/Stream/Async/Channel/Operations.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Operations.hsrenamed+4−4
@@ -8,14 +8,14 @@
88#endif
99
1010-- |
11−-- Module : Streamly.Internal.Data.Stream.Async.Channel.Operations
11+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
1212-- Copyright : (c) 2017 Composewell Technologies
1313-- License : BSD-3-Clause
1414-- Maintainer : streamly@composewell.com
1515-- Stability : experimental
1616-- Portability : GHC
1717
18−module Streamly.Internal.Data.Stream.Async.Channel.Operations
18+module Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
1919 (
2020 toChannel
2121 , toChannelK
@@ -42,8 +42,8 @@ import qualified Streamly.Internal.Data.Stream as Stream
4242import qualified Streamly.Internal.Data.Stream.StreamD.Type as D
4343import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
4444
45−import Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
46−import Streamly.Internal.Data.Stream.Async.Channel.Type
45+import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
46+import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
4747import Streamly.Internal.Data.Stream.Channel.Types
4848
4949import Prelude hiding (map, concat, concatMap)
src/Streamly/Internal/Data/Stream/Async/Channel/Type.hs → src/Streamly/Internal/Data/Stream/Concurrent/Channel/Type.hsrenamed+2−2
@@ -1,12 +1,12 @@
11-- |
2−-- Module : Streamly.Internal.Data.Stream.Async.Channel.Type
2+-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Type
33-- Copyright : (c) 2017 Composewell Technologies
44-- License : BSD-3-Clause
55-- Maintainer : streamly@composewell.com
66-- Stability : experimental
77-- Portability : GHC
88
9−module Streamly.Internal.Data.Stream.Async.Channel.Type
9+module Streamly.Internal.Data.Stream.Concurrent.Channel.Type
1010 (
1111 Channel(..)
1212 , yield
streamly.cabal+9−9
@@ -96,7 +96,7 @@ extra-source-files:
9696 test/Streamly/Test/Data/Ring/Unboxed.hs
9797 test/Streamly/Test/Data/Array/Stream/Unboxed.hs
9898 test/Streamly/Test/Data/Parser/ParserD.hs
99− test/Streamly/Test/Data/Stream/Async.hs
99+ test/Streamly/Test/Data/Stream/Concurrent.hs
100100 test/Streamly/Test/FileSystem/Event.hs
101101 test/Streamly/Test/FileSystem/Event/Common.hs
102102 test/Streamly/Test/FileSystem/Event/Darwin.hs
@@ -464,14 +464,14 @@ library
464464 , Streamly.Internal.Data.Stream.Channel.Dispatcher
465465 , Streamly.Internal.Data.Stream.Channel.Worker
466466
467− , Streamly.Internal.Data.Stream.Async.Channel.Type
468− , Streamly.Internal.Data.Stream.Async.Channel.Dispatcher
469− , Streamly.Internal.Data.Stream.Async.Channel.Consumer
470− , Streamly.Internal.Data.Stream.Async.Channel.Append
471− , Streamly.Internal.Data.Stream.Async.Channel.Interleave
472− , Streamly.Internal.Data.Stream.Async.Channel.Operations
473− , Streamly.Internal.Data.Stream.Async.Channel
474− , Streamly.Internal.Data.Stream.Async
467+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Type
468+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
469+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
470+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Append
471+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
472+ , Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
473+ , Streamly.Internal.Data.Stream.Concurrent.Channel
474+ , Streamly.Internal.Data.Stream.Concurrent
475475 , Streamly.Internal.Data.Stream.Ahead
476476 , Streamly.Internal.Data.Stream.ZipAsync
477477
targets/Targets.hs+1−1
@@ -27,7 +27,7 @@ targets =
2727 , "serial_async_cmp"
2828 ]
2929 )
30− , ("Data.Stream.Async",
30+ , ("Data.Stream.Concurrent",
3131 [ "prelude_concurrent_grp"
3232 , "infinite_grp"
3333 , "concurrent_cmp"
test/Streamly/Test/Data/Stream/Async.hs → test/Streamly/Test/Data/Stream/Concurrent.hsrenamed+4−4
@@ -1,5 +1,5 @@
11-- |
2−-- Module : Streamly.Test.Data.Stream.Async
2+-- Module : Streamly.Test.Data.Stream.Concurrent
33-- Copyright : (c) 2020 Composewell Technologies
44--
55-- License : BSD-3-Clause
@@ -7,7 +7,7 @@
77-- Stability : experimental
88-- Portability : GHC
99
10−module Streamly.Test.Data.Stream.Async (main) where
10+module Streamly.Test.Data.Stream.Concurrent (main) where
1111
1212#ifdef DEVBUILD
1313import Control.Concurrent (threadDelay)
@@ -25,12 +25,12 @@ import Test.Hspec as H
2525
2626import qualified Streamly.Data.Fold as Fold
2727import qualified Streamly.Data.Stream as Stream
28−import qualified Streamly.Internal.Data.Stream.Async as Async
28+import qualified Streamly.Internal.Data.Stream.Concurrent as Async
2929
3030import Streamly.Test.Common (listEquals)
3131
3232moduleName :: String
33−moduleName = "Data.Stream.Async"
33+moduleName = "Data.Stream.Concurrent"
3434
3535-------------------------------------------------------------------------------
3636-- Utilities
test/streamly-tests.cabal+3−3
@@ -389,11 +389,11 @@ test-suite Prelude.Async
389389 if flag(use-streamly-core)
390390 buildable: False
391391
392−test-suite Data.Stream.Async
392+test-suite Data.Stream.Concurrent
393393 import: test-options
394394 type: exitcode-stdio-1.0
395− main-is: Streamly/Test/Data/Stream/Async.hs
396− ghc-options: -main-is Streamly.Test.Data.Stream.Async.main
395+ main-is: Streamly/Test/Data/Stream/Concurrent.hs
396+ ghc-options: -main-is Streamly.Test.Data.Stream.Concurrent.main
397397 if flag(use-streamly-core)
398398 buildable: False
399399