Move Stream.Concurrent.Channel to Stream.Channel

This commit is contained in:
Harendra Kumar 2024-02-13 05:19:07 +05:30
parent 4a8a9a8571
commit bfff236977
10 changed files with 46 additions and 48 deletions

View File

@ -1,27 +1,27 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel
-- Module : Streamly.Internal.Data.Stream.Channel
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
module Streamly.Internal.Data.Stream.Concurrent.Channel
module Streamly.Internal.Data.Stream.Channel
(
-- ** Primitives
module Streamly.Internal.Data.Stream.Concurrent.Channel.Type
, module Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
, module Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
module Streamly.Internal.Data.Stream.Channel.Type
, module Streamly.Internal.Data.Stream.Channel.Dispatcher
, module Streamly.Internal.Data.Stream.Channel.Consumer
-- ** Allocating and Using
, newChannel
, module Streamly.Internal.Data.Stream.Concurrent.Channel.Append
, module Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
, module Streamly.Internal.Data.Stream.Channel.Append
, module Streamly.Internal.Data.Stream.Channel.Interleave
, withChannel
, withChannelK
-- quiesceChannel -- wait for running tasks but do not schedule any more.
-- ** Conversions
, module Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
, module Streamly.Internal.Data.Stream.Channel.Operations
-- ** Configuration
, Config
@ -61,12 +61,12 @@ import qualified Streamly.Internal.Data.StreamK as K
import Streamly.Internal.Data.Channel.Types
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
import Streamly.Internal.Data.Stream.Concurrent.Channel.Append
import Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
import Streamly.Internal.Data.Stream.Channel.Type
import Streamly.Internal.Data.Stream.Channel.Operations
import Streamly.Internal.Data.Stream.Channel.Append
import Streamly.Internal.Data.Stream.Channel.Interleave
import Streamly.Internal.Data.Stream.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Channel.Consumer
-- | Create a new concurrent stream evaluation channel. The monad
-- state used to run the stream actions is captured from the call site of

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Append
-- Module : Streamly.Internal.Data.Stream.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.Concurrent.Channel.Append
module Streamly.Internal.Data.Stream.Channel.Append
(
newAppendChannel
)
@ -38,11 +38,11 @@ import qualified Data.Heap as H
import qualified Data.Set as Set
import qualified Streamly.Internal.Data.StreamK as K
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.Channel.Types
import Streamly.Internal.Data.Channel.Worker
import Streamly.Internal.Data.Stream.Channel.Consumer
import Streamly.Internal.Data.Stream.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Channel.Type
------------------------------------------------------------------------------
-- Concurrent streams with first-come-first serve results

View File

@ -1,12 +1,12 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
-- Module : Streamly.Internal.Data.Stream.Channel.Consumer
-- Copyright : (c) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : streamly@composewell.com
-- Stability : experimental
-- Portability : GHC
--
module Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
module Streamly.Internal.Data.Stream.Channel.Consumer
(
-- * Read Output
readOutputQPaced
@ -23,10 +23,10 @@ import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.IORef (readIORef)
import Streamly.Internal.Control.Concurrent (MonadRunInIO)
import Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Channel.Dispatcher
import Streamly.Internal.Data.Channel.Types
import Streamly.Internal.Data.Stream.Channel.Dispatcher
import Streamly.Internal.Data.Stream.Channel.Type
-------------------------------------------------------------------------------
-- Reading from the workers' output queue/buffer

View File

@ -1,5 +1,5 @@
-- |
-- Module : Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
-- Module : Streamly.Internal.Data.Stream.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.Concurrent.Channel.Dispatcher
module Streamly.Internal.Data.Stream.Channel.Dispatcher
(
-- * Dispatching
pushWorker
@ -33,10 +33,10 @@ import Streamly.Internal.Data.Time.Clock (Clock(Monotonic), getTime)
import Streamly.Internal.Data.Time.Units
(MicroSecond64(..), diffAbsTime64, fromRelTime64, toRelTime64)
import Streamly.Internal.Data.Stream.Concurrent.Channel.Type
import Streamly.Internal.Data.Channel.Dispatcher
import Streamly.Internal.Data.Channel.Types
import Streamly.Internal.Data.Channel.Worker
import Streamly.Internal.Data.Stream.Channel.Type
-------------------------------------------------------------------------------
-- Dispatching workers

View File

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

View File

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

View File

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

View File

@ -8,7 +8,6 @@
-- Single effects related functionality can be moved to
-- Data.Async/Control.Async.
-- Stream channel to Data.Stream.Channel.
module Streamly.Internal.Data.Stream.Concurrent
(
@ -92,7 +91,7 @@ import qualified Streamly.Internal.Data.StreamK as K
import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
import Streamly.Internal.Data.Channel.Types
import Streamly.Internal.Data.Stream.Concurrent.Channel
import Streamly.Internal.Data.Stream.Channel
-- $setup
--

View File

@ -8,9 +8,8 @@
--
module Streamly.Internal.Data.Stream.Prelude
(
-- XXX Move to Stream.Channel
-- * Concurrency Channels
module Streamly.Internal.Data.Stream.Concurrent.Channel
module Streamly.Internal.Data.Stream.Channel
-- * Concurrent Streams
, module Streamly.Internal.Data.Stream.Concurrent
-- * Time
@ -20,7 +19,7 @@ module Streamly.Internal.Data.Stream.Prelude
)
where
import Streamly.Internal.Data.Stream.Channel
import Streamly.Internal.Data.Stream.Concurrent
import Streamly.Internal.Data.Stream.Concurrent.Channel
import Streamly.Internal.Data.Stream.Time
import Streamly.Internal.Data.Stream.Lifted

View File

@ -454,13 +454,13 @@ library
, Streamly.Internal.Data.Channel.Dispatcher
, Streamly.Internal.Data.Channel.Worker
, 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.Channel.Type
, Streamly.Internal.Data.Stream.Channel.Dispatcher
, Streamly.Internal.Data.Stream.Channel.Consumer
, Streamly.Internal.Data.Stream.Channel.Append
, Streamly.Internal.Data.Stream.Channel.Interleave
, Streamly.Internal.Data.Stream.Channel.Operations
, Streamly.Internal.Data.Stream.Channel
, Streamly.Internal.Data.Stream.Concurrent
, Streamly.Internal.Data.Stream.Time
, Streamly.Internal.Data.Stream.Lifted