diff --git a/src/Streamly/Internal/Data/Stream/StreamD/Nesting.hs b/src/Streamly/Internal/Data/Stream/StreamD/Nesting.hs index f09790458f..7a83eb031f 100644 --- a/src/Streamly/Internal/Data/Stream/StreamD/Nesting.hs +++ b/src/Streamly/Internal/Data/Stream/StreamD/Nesting.hs @@ -489,6 +489,25 @@ mergeBy cmp = mergeByM (\a b -> return $ cmp a b) -- Intersection of sorted streams ------------------------------------------------------------------------------- +data StreamEmptyNess = + LeftEmpty + | RightEmpty + | BothEmpty + | NoneEmpty + deriving (Eq, Show) + +data RunOrder = + LeftRun + | RightRun + | CompareRun + | CompareDupRun + | FastFarwardRun + | RightDupRun + | BuffPrepare + | BuffPair + | BuffReset + deriving (Eq, Show) + -- Assuming the streams are sorted in ascending order {-# INLINE_NORMAL intersectBySorted #-} intersectBySorted :: Monad m diff --git a/streamly.cabal b/streamly.cabal index 440fad48d3..496d8f8426 100644 --- a/streamly.cabal +++ b/streamly.cabal @@ -102,6 +102,7 @@ extra-source-files: test/Streamly/Test/Data/Array/Foreign.hs test/Streamly/Test/Data/Array/Stream/Foreign.hs test/Streamly/Test/Data/Parser/ParserD.hs + test/Streamly/Test/Data/Stream/Top.hs test/Streamly/Test/FileSystem/Event.hs test/Streamly/Test/FileSystem/Event/Common.hs test/Streamly/Test/FileSystem/Event/Darwin.hs diff --git a/test/Streamly/Test/Data/Stream/Top.hs b/test/Streamly/Test/Data/Stream/Top.hs index 78684ede35..41f8e69a0e 100644 --- a/test/Streamly/Test/Data/Stream/Top.hs +++ b/test/Streamly/Test/Data/Stream/Top.hs @@ -43,7 +43,7 @@ intersectBySorted = compare (S.fromList ls0) (S.fromList ls1) - let v2 = intersect ls0 ls1 + let v2 = ls0 `intersect` ls1 assert (v1 == sort v2) unionBySorted :: Property