on master help sign in
Use Fuse annotation on fold Step type
5a51ac2Harendra Kumar
src/Streamly/Internal/Data/Fold/Types.hs+2−1
@@ -164,6 +164,7 @@ import Data.Maybe (isJust, fromJust)
164#if __GLASGOW_HASKELL__ < 808
164#if __GLASGOW_HASKELL__ < 808
165import Data.Semigroup (Semigroup(..))
165import Data.Semigroup (Semigroup(..))
166#endif
166#endif
167+import Fusion.Plugin.Types (Fuse(..))
167import Streamly.Internal.Data.Tuple.Strict (Tuple'(..), Tuple3'(..))
168import Streamly.Internal.Data.Tuple.Strict (Tuple'(..), Tuple3'(..))
168import Streamly.Internal.Data.SVar (MonadAsync)
169import Streamly.Internal.Data.SVar (MonadAsync)
169
170
@@ -177,7 +178,7 @@ import Prelude hiding (concatMap)
177-- represents a new intermediate value available to be extracted. @Done@
178-- represents a new intermediate value available to be extracted. @Done@
178-- represents that the fold has been terminated and won't be processed
179-- represents that the fold has been terminated and won't be processed
179-- further.
180-- further.
180−-- {-# ANN type Step Fuse #-}
181+{-# ANN type Step Fuse #-}
181data Step s b
182data Step s b
182 = Partial !s
183 = Partial !s
183 | Done !b
184 | Done !b