Skip to content

Commit

Permalink
Fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
rnjtranjan committed Mar 6, 2022
1 parent 3dd70d9 commit a511992
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/Streamly/Internal/Data/Stream/StreamD/Nesting.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions streamly.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/Streamly/Test/Data/Stream/Top.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a511992

Please sign in to comment.