on master help sign in
Add a Streamly.Data.Stream.Prelude module
commit29286023dd5f612782417b8b4bd0e03ccaf061c7 authorHarendra Kumar <harendra@composewell.com> dateWed 7 Dec 2022, 02:13 (4 years ago) parentcde4e2e
5 files changed+40−7
src/Streamly/Data/Stream/Exception.hs+1−1 src/Streamly/Data/Stream/Prelude.hs+30 src/Streamly/Internal/Data/Stream/Time.hs+1−1 src/Streamly/Network/Socket.hs+1−1 streamly.cabal+7−4
src/Streamly/Data/Stream/Exception.hs+1−1
@@ -15,7 +15,7 @@ module Streamly.Data.Stream.Exception
1515 (
1616 after
1717 , bracket
18− , bracket3
18+ -- , bracket3
1919 , finally
2020 )
2121where
src/Streamly/Data/Stream/Prelude.hsnew file+30
@@ -0,0 +1,30 @@
1+-- |
2+-- Module : Streamly.Data.Stream.Prelude
3+-- Copyright : (c) 2022 Composewell Technologies
4+-- License : BSD-3-Clause
5+-- Maintainer : streamly@composewell.com
6+-- Stability : experimental
7+-- Portability : GHC
8+--
9+-- This module re-exports the "Streamly.Data.Stream" module from the
10+-- "streamly-core" package and additionally provides concurrency, time and
11+-- lifted exception operations as well in a single module.
12+--
13+module Streamly.Data.Stream.Prelude
14+ ( module Streamly.Data.Stream
15+ , module Streamly.Data.Stream.Concurrent
16+ , module Streamly.Data.Stream.Exception
17+ , module Streamly.Data.Stream.Time
18+ , liftInner
19+ , runReaderT
20+ , runStateT
21+ -- , module Streamly.Internal.Data.Stream.Extra
22+ )
23+where
24+
25+import Streamly.Data.Stream
26+import Streamly.Data.Stream.Concurrent
27+import Streamly.Data.Stream.Exception
28+import Streamly.Data.Stream.Time
29+import Streamly.Internal.Data.Stream.Transformer
30+import Streamly.Internal.Data.Stream.Extra
src/Streamly/Internal/Data/Stream/Time.hs+1−1
@@ -96,8 +96,8 @@ import Streamly.Internal.Data.Stream.Concurrent
9696-- >>> import qualified Streamly.Data.Fold as Fold
9797-- >>> import qualified Streamly.Data.Parser as Parser
9898-- >>> import qualified Streamly.Data.Stream as Stream
99+-- >>> import qualified Streamly.Data.Stream.Prelude as Stream
99100-- >>> import qualified Streamly.Internal.Data.Stream as Stream (delayPost, timestamped)
100−-- >>> import qualified Streamly.Data.Stream.Concurrent as Stream
101101-- >>> import qualified Streamly.Internal.Data.Stream.Concurrent as Stream (parEagerFst)
102102-- >>> import qualified Streamly.Internal.Data.Stream.Time as Stream
103103-- >>> import Prelude hiding (concatMap, concat)
src/Streamly/Network/Socket.hs+1−1
@@ -34,7 +34,7 @@
3434-- >>>
3535-- >>> import qualified Streamly.Data.Fold as Fold
3636-- >>> import qualified Streamly.Data.Stream as Stream
37−-- >>> import qualified Streamly.Data.Stream.Concurrent as Stream
37+-- >>> import qualified Streamly.Data.Stream.Prelude as Stream
3838-- >>> import qualified Streamly.Network.Socket as Socket
3939-- >>>
4040-- >>> :{
streamly.cabal+7−4
@@ -380,9 +380,7 @@ library
380380 , Streamly.Internal.Network.Inet.TCP
381381
382382 -- Exposed modules
383− , Streamly.Data.Stream.Exception
384− , Streamly.Data.Stream.Concurrent
385− , Streamly.Data.Stream.Time
383+ , Streamly.Data.Stream.Prelude
386384
387385 -- Network/IO
388386 , Streamly.Network.Socket
@@ -443,7 +441,7 @@ library
443441 , Streamly.Data.Fold
444442 , Streamly.Data.Fold.Tee
445443 , Streamly.Data.Parser
446− , Streamly.Data.Stream
444+ -- , Streamly.Data.Stream
447445 , Streamly.Data.Unfold
448446 , Streamly.FileSystem.Handle
449447 , Streamly.Unicode.Parser
@@ -469,6 +467,11 @@ library
469467 if os(linux) || os(darwin) || os(windows)
470468 exposed-modules: Streamly.Internal.FileSystem.Event
471469
470+ other-modules:
471+ Streamly.Data.Stream.Exception
472+ , Streamly.Data.Stream.Concurrent
473+ , Streamly.Data.Stream.Time
474+
472475 build-depends:
473476 -- Core libraries shipped with ghc, the min and max
474477 -- constraints of these libraries should match with