mirror of
https://github.com/composewell/streamly.git
synced 2024-09-17 14:37:27 +03:00
Import from lower level modules
This commit is contained in:
parent
27d3575855
commit
678ee5e00d
@ -394,16 +394,6 @@ _Fold1 step = mkAccum step_ Nothing' toMaybe
|
||||
-- Run Effects
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
-- | A fold that drains all its input, running the effects and discarding the
|
||||
-- results.
|
||||
--
|
||||
-- > drain = drainBy (const (return ()))
|
||||
--
|
||||
-- @since 0.7.0
|
||||
{-# INLINABLE drain #-}
|
||||
drain :: Monad m => Fold m a ()
|
||||
drain = mkAccum_ (\_ _ -> ()) ()
|
||||
|
||||
-- |
|
||||
-- > drainBy f = lmapM f drain
|
||||
-- > drainBy = FL.foldMapM (void . f)
|
||||
|
@ -186,6 +186,7 @@ module Streamly.Internal.Data.Fold.Types
|
||||
, simplify
|
||||
|
||||
-- * Basic Folds
|
||||
, drain
|
||||
, toList
|
||||
|
||||
-- * Generators
|
||||
@ -439,6 +440,16 @@ simplify (Fold2 step inject extract) c =
|
||||
-- Basic Folds
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
-- | A fold that drains all its input, running the effects and discarding the
|
||||
-- results.
|
||||
--
|
||||
-- > drain = drainBy (const (return ()))
|
||||
--
|
||||
-- @since 0.7.0
|
||||
{-# INLINABLE drain #-}
|
||||
drain :: Monad m => Fold m a ()
|
||||
drain = mkAccum_ (\_ _ -> ()) ()
|
||||
|
||||
-- | Folds the input stream to a list.
|
||||
--
|
||||
-- /Warning!/ working on large lists accumulated as buffers in memory could be
|
||||
|
@ -202,7 +202,7 @@ import Prelude
|
||||
import Streamly.Internal.Data.Fold.Types (Fold(..))
|
||||
import Streamly.Internal.Data.Parser.ParserK.Types (Parser)
|
||||
|
||||
import qualified Streamly.Internal.Data.Fold as FL
|
||||
import qualified Streamly.Internal.Data.Fold.Types as FL
|
||||
import qualified Streamly.Internal.Data.Parser.ParserD as D
|
||||
import qualified Streamly.Internal.Data.Parser.ParserK.Types as K
|
||||
|
||||
|
@ -139,7 +139,7 @@ import Fusion.Plugin.Types (Fuse(..))
|
||||
import Streamly.Internal.Data.Fold.Types (Fold(..), toList)
|
||||
import Streamly.Internal.Data.Tuple.Strict (Tuple3'(..))
|
||||
|
||||
import qualified Streamly.Internal.Data.Fold as FL
|
||||
import qualified Streamly.Internal.Data.Fold.Types as FL
|
||||
|
||||
import Prelude hiding (concatMap)
|
||||
|
||||
|
@ -162,7 +162,7 @@ import Streamly.Internal.Data.Parser (ParseError(..))
|
||||
import Streamly.Internal.Data.Unfold.Types (Unfold(..))
|
||||
|
||||
import qualified Streamly.Internal.Data.Array.Foreign.Types as A
|
||||
import qualified Streamly.Internal.Data.Fold as FL
|
||||
import qualified Streamly.Internal.Data.Fold.Types as FL
|
||||
import qualified Streamly.Internal.Data.Parser as PR
|
||||
import qualified Streamly.Internal.Data.Parser.ParserD as PRD
|
||||
import qualified Streamly.Internal.Ring.Foreign as RB
|
||||
|
@ -140,7 +140,7 @@ import Streamly.Internal.Data.Time.Units
|
||||
(TimeUnit64, toRelTime64, diffAbsTime64)
|
||||
|
||||
import qualified Streamly.Internal.Data.Array.Foreign.Types as A
|
||||
import qualified Streamly.Internal.Data.Fold as FL
|
||||
import qualified Streamly.Internal.Data.Fold.Types as FL
|
||||
import qualified Streamly.Internal.Data.IORef.Prim as Prim
|
||||
import qualified Streamly.Internal.Data.Pipe.Types as Pipe
|
||||
import qualified Streamly.Internal.Data.Stream.StreamK as K
|
||||
|
Loading…
Reference in New Issue
Block a user