on master help sign in
Add Fuse annotation on concat
e6eb517Harendra Kumar
src/Streamly/Internal/Data/Unfold.hs+2
@@ -139,6 +139,7 @@ import GHC.Types (SPEC(..))
139import Prelude
139import Prelude
140 hiding (concat, map, mapM, takeWhile, take, filter, const, zipWith)
140 hiding (concat, map, mapM, takeWhile, take, filter, const, zipWith)
141
141
142+import Fusion.Plugin.Types (Fuse(..))
142import Streamly.Internal.Data.Stream.StreamD.Type (Stream(..), Step(..))
143import Streamly.Internal.Data.Stream.StreamD.Type (Stream(..), Step(..))
143#if __GLASGOW_HASKELL__ < 800
144#if __GLASGOW_HASKELL__ < 800
144import Streamly.Internal.Data.Stream.StreamD.Type (pattern Stream)
145import Streamly.Internal.Data.Stream.StreamD.Type (pattern Stream)
@@ -621,6 +622,7 @@ teeZipWith f unf1 unf2 = lmap (\x -> (x,x)) $ zipWith f unf1 unf2
621-- Nested
622-- Nested
622-------------------------------------------------------------------------------
623-------------------------------------------------------------------------------
623
624
625+{-# ANN type ConcatState Fuse #-}
624data ConcatState s1 s2 = ConcatOuter s1 | ConcatInner s1 s2
626data ConcatState s1 s2 = ConcatOuter s1 | ConcatInner s1 s2
625
627
626-- | Apply the second unfold to each output element of the first unfold and
628-- | Apply the second unfold to each output element of the first unfold and