File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
core/src/Streamly/Internal/Data/Fold Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -954,7 +954,7 @@ instance Functor m => Functor (Fold m a) where
954954--
955955{-# INLINE fromPure #-}
956956fromPure :: Applicative m => b -> Fold m a b
957- fromPure = fromScanl . Scanl. const
957+ fromPure b = Fold undefined ( pure $ Done b) pure pure
958958
959959-- | Make a fold that yields the result of the supplied effectful action
960960-- without consuming any further input.
@@ -963,7 +963,7 @@ fromPure = fromScanl . Scanl.const
963963--
964964{-# INLINE fromEffect #-}
965965fromEffect :: Applicative m => m b -> Fold m a b
966- fromEffect = fromScanl . Scanl. constM
966+ fromEffect b = Fold undefined ( Done <$> b) pure pure
967967
968968{-# ANN type SeqFoldState Fuse #-}
969969data SeqFoldState sl f sr = SeqFoldL ! sl | SeqFoldR ! f ! sr
You can’t perform that action at this time.
0 commit comments