File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
src/Streamly/Internal/Data/Stream/StreamD
test/Streamly/Test/Data/Stream Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,25 @@ mergeBy cmp = mergeByM (\a b -> return $ cmp a b)
489489-- Intersection of sorted streams
490490-------------------------------------------------------------------------------
491491
492+ data StreamEmptyNess =
493+ LeftEmpty
494+ | RightEmpty
495+ | BothEmpty
496+ | NoneEmpty
497+ deriving (Eq , Show )
498+
499+ data RunOrder =
500+ LeftRun
501+ | RightRun
502+ | CompareRun
503+ | CompareDupRun
504+ | FastFarwardRun
505+ | RightDupRun
506+ | BuffPrepare
507+ | BuffPair
508+ | BuffReset
509+ deriving (Eq , Show )
510+
492511-- Assuming the streams are sorted in ascending order
493512{-# INLINE_NORMAL intersectBySorted #-}
494513intersectBySorted :: Monad m
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ extra-source-files:
102102 test/Streamly/Test/Data/Array/Foreign.hs
103103 test/Streamly/Test/Data/Array/Stream/Foreign.hs
104104 test/Streamly/Test/Data/Parser/ParserD.hs
105+ test/Streamly/Test/Data/Stream/Top.hs
105106 test/Streamly/Test/FileSystem/Event.hs
106107 test/Streamly/Test/FileSystem/Event/Common.hs
107108 test/Streamly/Test/FileSystem/Event/Darwin.hs
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ intersectBySorted =
4343 compare
4444 (S. fromList ls0)
4545 (S. fromList ls1)
46- let v2 = intersect ls0 ls1
46+ let v2 = ls0 `intersect` ls1
4747 assert (v1 == sort v2)
4848
4949unionBySorted :: Property
You can’t perform that action at this time.
0 commit comments