-- | Run a side effect whenever the fold stops normally, aborts due to an
-- exception or is garbage collected.
--
{-# INLINE afterIO #-}
afterIO :: (MonadIO m, MonadCatch m) => IO b -> Fold m a b -> Fold m a b
afterIO aft (Fold step1 initial1 extract1 final1) =
Fold step initial extract final
In the Fold.Exception module:
This was called
finallyin the original PR - https://github.com/composewell/streamly/pull/531/files . Shouldn't it befinally?