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 2337884 commit d4ffa29
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 d4ffa29

Please sign in to comment.