on master help sign in
Use Fuse annotation on fold Step type

This is required to fuse the lastN benchmark.

commit5a51ac2accf82816bb721cc7cfd05de6ac433e4a authorHarendra Kumar <harendra@composewell.com> dateFri 4 Dec 2020, 11:56 (6 years ago) parentcb0db66
1 file changed+2−1
src/Streamly/Internal/Data/Fold/Types.hs+2−1
src/Streamly/Internal/Data/Fold/Types.hs+2−1
@@ -164,6 +164,7 @@ import Data.Maybe (isJust, fromJust)
164164#if __GLASGOW_HASKELL__ < 808
165165import Data.Semigroup (Semigroup(..))
166166#endif
167+import Fusion.Plugin.Types (Fuse(..))
167168import Streamly.Internal.Data.Tuple.Strict (Tuple'(..), Tuple3'(..))
168169import Streamly.Internal.Data.SVar (MonadAsync)
169170
@@ -177,7 +178,7 @@ import Prelude hiding (concatMap)
177178-- represents a new intermediate value available to be extracted. @Done@
178179-- represents that the fold has been terminated and won't be processed
179180-- further.
180−-- {-# ANN type Step Fuse #-}
181+{-# ANN type Step Fuse #-}
181182data Step s b
182183 = Partial !s
183184 | Done !b