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)
489
489
-- Intersection of sorted streams
490
490
-------------------------------------------------------------------------------
491
491
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
+
492
511
-- Assuming the streams are sorted in ascending order
493
512
{-# INLINE_NORMAL intersectBySorted #-}
494
513
intersectBySorted :: Monad m
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ extra-source-files:
102
102
test/Streamly/Test/Data/Array/Foreign.hs
103
103
test/Streamly/Test/Data/Array/Stream/Foreign.hs
104
104
test/Streamly/Test/Data/Parser/ParserD.hs
105
+ test/Streamly/Test/Data/Stream/Top.hs
105
106
test/Streamly/Test/FileSystem/Event.hs
106
107
test/Streamly/Test/FileSystem/Event/Common.hs
107
108
test/Streamly/Test/FileSystem/Event/Darwin.hs
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ intersectBySorted =
43
43
compare
44
44
(S. fromList ls0)
45
45
(S. fromList ls1)
46
- let v2 = intersect ls0 ls1
46
+ let v2 = ls0 `intersect` ls1
47
47
assert (v1 == sort v2)
48
48
49
49
unionBySorted :: Property
You can’t perform that action at this time.
0 commit comments