Skip to content

Commit

Permalink
Comment out the doctest in Pipe.fromFold
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Nov 6, 2024
1 parent 963ac73 commit c24ee84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/Streamly/Internal/Data/Pipe/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -653,13 +653,15 @@ scanFold (Fold fstep finitial fextract _) =
produce (FoldProduceInit st x) = consume (FoldConsumeGo st) x
produce FoldProduceStop = return Stop

-- XXX The doctest for Pipe.fromFold fails with "[]" as the result.

-- | Create a singleton pipe from a fold.
--
-- Pipes do not support finalization yet. This does not finalize the fold
-- when the stream stops before the fold terminates. So cannot be used on folds
-- that require such finalization.
--
-- >>> Stream.toList $ Stream.pipe (Pipe.fromFold Fold.sum) $ Stream.fromList [1..5::Int]
-- >> Stream.toList $ Stream.pipe (Pipe.fromFold Fold.sum) $ Stream.fromList [1..5::Int]
-- [15]
--
{-# INLINE fromFold #-}
Expand Down

0 comments on commit c24ee84

Please sign in to comment.