@@ -1038,7 +1038,7 @@ duplicate (Fold step1 initial1 extract1) =
1038-- value returned by this effect as its initial value.
1038-- value returned by this effect as its initial value.
1040-- /Pre-release/
1040-- /Pre-release/
1041−{-# INLINABLE initialize #-}
1041+{-# INLINE initialize #-}
1042initialize :: Monad m => Fold m a b -> m (Fold m a b)
1042initialize :: Monad m => Fold m a b -> m (Fold m a b)
1043initialize (Fold step initial extract) = do
1043initialize (Fold step initial extract) = do
1044 i <- initial
1044 i <- initial
@@ -1048,17 +1048,14 @@ initialize (Fold step initial extract) = do
1048-- the returned fold.
1048-- the returned fold.
1050-- /Pre-release/
1050-- /Pre-release/
1051−{-# INLINABLE runStep #-}
1051+{-# INLINE runStep #-}
1052runStep :: Monad m => Fold m a b -> a -> m (Fold m a b)
1052runStep :: Monad m => Fold m a b -> a -> m (Fold m a b)
1053−runStep (Fold step initial extract) a = return $ Fold step initial1 extract
1053+runStep (Fold step initial extract) a = do
1058− res <- initial
1054+ res <- initial
1059− case res of
1055+ r <- case res of
1060− Partial fs -> step fs a
1056+ Partial fs -> step fs a
1061− b@(Done _) -> return b
1057+ b@(Done _) -> return b
1058+ return $ Fold step (return r) extract
1063------------------------------------------------------------------------------
1060------------------------------------------------------------------------------
1064-- Parsing
1061-- Parsing