@@ -2,7 +2,7 @@
22{-# LANGUAGE UndecidableInstances #-}
33
44-- |
5−-- Module : Streamly.Internal.Data.Stream.StreamD.Type
5+-- Module : Streamly.Internal.Data.Stream.Type
66-- Copyright : (c) 2018 Composewell Technologies
77-- (c) Roman Leshchinskiy 2008-2010
88-- License : BSD-3-Clause
@@ -14,7 +14,7 @@
1414-- module have been originally adapted from the vector package (c) Roman
1515-- Leshchinskiy. See the notes in specific functions.
1616
17−module Streamly.Internal.Data.Stream.StreamD.Type
17+module Streamly.Internal.Data.Stream.Type
1818 (
1919 -- * The stream type
2020 Step (..)
@@ -44,20 +44,20 @@ module Streamly.Internal.Data.Stream.StreamD.Type
4444 , fromEffect
4545
4646 -- ** From Containers
47− , Streamly.Internal.Data.Stream.StreamD.Type.fromList
47+ , Streamly.Internal.Data.Stream.Type.fromList
4848
4949 -- * Elimination
5050 -- ** Primitives
5151 , uncons
5252
5353 -- ** Strict Left Folds
54− , Streamly.Internal.Data.Stream.StreamD.Type.fold
54+ , Streamly.Internal.Data.Stream.Type.fold
5555 , foldBreak
5656 , foldAddLazy
5757 , foldAdd
5858 , foldEither
5959
60− , Streamly.Internal.Data.Stream.StreamD.Type.foldl'
60+ , Streamly.Internal.Data.Stream.Type.foldl'
6161 , foldlM'
6262 , foldlx'
6363 , foldlMx'
@@ -65,12 +65,12 @@ module Streamly.Internal.Data.Stream.StreamD.Type
6565 -- ** Lazy Right Folds
6666 , foldrM
6767 , foldrMx
68− , Streamly.Internal.Data.Stream.StreamD.Type.foldr
68+ , Streamly.Internal.Data.Stream.Type.foldr
6969 , foldrS
7070
7171 -- ** Specific Folds
7272 , drain
73− , Streamly.Internal.Data.Stream.StreamD.Type.toList
73+ , Streamly.Internal.Data.Stream.Type.toList
7474
7575 -- * Mapping
7676 , map
@@ -158,12 +158,12 @@ import Streamly.Internal.BaseCompat ((#.))
158158import Streamly.Internal.Data.Fold.Type (Fold(..))
159159import Streamly.Internal.Data.Maybe.Strict (Maybe'(..), toMaybe)
160160import Streamly.Internal.Data.Refold.Type (Refold(..))
161−import Streamly.Internal.Data.Stream.StreamD.Step (Step (..))
161+import Streamly.Internal.Data.Stream.Step (Step (..))
162162import Streamly.Internal.Data.SVar.Type (State, adaptState, defState)
163163import Streamly.Internal.Data.Unfold.Type (Unfold(..))
164164
165165import qualified Streamly.Internal.Data.Fold.Type as FL hiding (foldr)
166−import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
166+import qualified Streamly.Internal.Data.StreamK.Type as K
167167#ifdef USE_UNFOLDS_EVERYWHERE
168168import qualified Streamly.Internal.Data.Unfold.Type as Unfold
169169#endif
@@ -505,7 +505,7 @@ foldAddLazy (Fold fstep finitial fextract) (Stream sstep state) =
505505--
506506foldAdd :: Monad m => Fold m a b -> Stream m a -> m (Fold m a b)
507507foldAdd f =
508− Streamly.Internal.Data.Stream.StreamD.Type.fold (FL.duplicate f)
508+ Streamly.Internal.Data.Stream.Type.fold (FL.duplicate f)
509509
510510------------------------------------------------------------------------------
511511-- Right Folds
@@ -740,7 +740,7 @@ drain (Stream step state) = go SPEC state
740740--
741741{-# INLINE_NORMAL toList #-}
742742toList :: Monad m => Stream m a -> m [a]
743−toList = Streamly.Internal.Data.Stream.StreamD.Type.foldr (:) []
743+toList = Streamly.Internal.Data.Stream.Type.foldr (:) []
744744
745745-- Use foldr/build fusion to fuse with list consumers
746746-- This can be useful when using the IsList instance
@@ -753,7 +753,7 @@ toListFB c n (Stream step state) = go state
753753 Skip s -> go s
754754 Stop -> n
755755
756−{-# RULES "toList Identity" Streamly.Internal.Data.Stream.StreamD.Type.toList = toListId #-}
756+{-# RULES "toList Identity" Streamly.Internal.Data.Stream.Type.toList = toListId #-}
757757{-# INLINE_EARLY toListId #-}
758758toListId :: Stream Identity a -> Identity [a]
759759toListId s = Identity $ build (\c n -> toListFB c n s)
@@ -880,10 +880,10 @@ instance IsList (Stream Identity a) where
880880 type (Item (Stream Identity a)) = a
881881
882882 {-# INLINE fromList #-}
883− fromList = Streamly.Internal.Data.Stream.StreamD.Type.fromList
883+ fromList = Streamly.Internal.Data.Stream.Type.fromList
884884
885885 {-# INLINE toList #-}
886− toList = runIdentity . Streamly.Internal.Data.Stream.StreamD.Type.toList
886+ toList = runIdentity . Streamly.Internal.Data.Stream.Type.toList
887887
888888instance Eq a => Eq (Stream Identity a) where
889889 {-# INLINE (==) #-}
@@ -930,13 +930,13 @@ instance Show a => Show (Stream Identity a) where
930930instance Read a => Read (Stream Identity a) where
931931 readPrec = parens $ prec 10 $ do
932932 Ident "fromList" <- lexP
933− Streamly.Internal.Data.Stream.StreamD.Type.fromList <$> readPrec
933+ Streamly.Internal.Data.Stream.Type.fromList <$> readPrec
934934
935935 readListPrec = readListPrecDefault
936936
937937instance (a ~ Char) => IsString (Stream Identity a) where
938938 {-# INLINE fromString #-}
939− fromString = Streamly.Internal.Data.Stream.StreamD.Type.fromList
939+ fromString = Streamly.Internal.Data.Stream.Type.fromList
940940
941941-------------------------------------------------------------------------------
942942-- Foldable
@@ -957,7 +957,7 @@ instance (Foldable m, Monad m) => Foldable (Stream m) where
957957 {-# INLINE foldMap #-}
958958 foldMap f =
959959 Data.Foldable.fold
960− . Streamly.Internal.Data.Stream.StreamD.Type.foldr (mappend . f) mempty
960+ . Streamly.Internal.Data.Stream.Type.foldr (mappend . f) mempty
961961
962962 {-# INLINE foldr #-}
963963 foldr f z t = appEndo (foldMap (Endo #. f) t) z