@@ -1038,7 +1038,7 @@ duplicate (Fold step1 initial1 extract1) =
10381038-- value returned by this effect as its initial value.
10391039--
10401040-- /Pre-release/
1041−{-# INLINABLE initialize #-}
1041+{-# INLINE initialize #-}
10421042initialize :: Monad m => Fold m a b -> m (Fold m a b)
10431043initialize (Fold step initial extract) = do
10441044 i <- initial
@@ -1048,17 +1048,14 @@ initialize (Fold step initial extract) = do
10481048-- the returned fold.
10491049--
10501050-- /Pre-release/
1051−{-# INLINABLE runStep #-}
1051+{-# INLINE runStep #-}
10521052runStep :: Monad m => Fold m a b -> a -> m (Fold m a b)
1053−runStep (Fold step initial extract) a = return $ Fold step initial1 extract
1054−
1055− where
1056−
1057− initial1 = do
1058− res <- initial
1059− case res of
1060− Partial fs -> step fs a
1061− b@(Done _) -> return b
1053+runStep (Fold step initial extract) a = do
1054+ res <- initial
1055+ r <- case res of
1056+ Partial fs -> step fs a
1057+ b@(Done _) -> return b
1058+ return $ Fold step (return r) extract
10621059
10631060------------------------------------------------------------------------------
10641061-- Parsing