on master help sign in
Use Internal.Prelude module in place of Internal
commitb051167f42c9aaabe46936fa6e93cee45466a8c6 authorHarendra Kumar <harendra.kumar@gmail.com> dateSat 21 Sep 2019, 21:09 (7 years ago) parentbeeed6b
3 files changed+7−47
src/Streamly/Internal.hs−41 test/Arrays.hs+4−3 test/Main.hs+3−3
src/Streamly/Internal.hs−41
@@ -22,54 +22,14 @@ module Streamly.Internal
2222 inspectMode
2323
2424 -- * Streamly.Prelude Experimental Exports
25− , foldrS
26− , foldrT
27− , prescanl'
28− , prescanlM'
29−
30− , toListRev
3125 , toListRevF
32− , toStream
33− , toStreamRev
34−
35− , insertAfterEach
36− , interject
37− , reverse'
38−
39− , splitAt -- spanN
40− , span -- spanWhile
41− , break -- breakBefore
42− , spanBy
43− , spanByRolling
44− , arraysOf
45− , splitOnSeq
46− , splitOnSuffixSeq
47− , splitBySeq
48− , splitWithSuffixSeq
49− , splitInnerBy
50− , splitInnerBySuffix
51−
5226 , tapAsync
5327
54− , classifySessionsOf
55− , classifySessionsBy
56− , classifyKeepAliveSessions
57−
58− , append
59− , interleave
60− , interleaveFst
61− , interleaveMin
62− , roundrobin
6328 , wSerialFst
6429 , wSerialMin
6530 , parallelFst
6631 , parallelMin
6732
68− , concatMapU
69− , concatUnfoldInterleave
70− , concatUnfoldRoundrobin
71− , intercalateSuffix
72−
7333 -- * Streamly.Fold Experimental Exports
7434 , Fold (..)
7535 , rollingHash
@@ -107,4 +67,3 @@ import Streamly.Unfold (fromList)
10767
10868import Streamly.Fold.Internal
10969import Streamly.Fold.Types
110−import Streamly.Internal.Prelude hiding (fromList)
test/Arrays.hs+4−3
@@ -14,6 +14,7 @@ import Test.Hspec as H
1414import qualified Streamly.Memory.Array as A
1515import qualified Streamly.Prelude as S
1616import qualified Streamly.Internal as Internal
17+import qualified Streamly.Internal.Prelude as IP
1718
1819-- Coverage build takes too long with default number of tests
1920maxTestCount :: Int
@@ -75,7 +76,7 @@ testArraysOf =
7576 monadicIO $ do
7677 xs <- S.toList
7778 $ S.concatMap A.read
78− $ Internal.arraysOf 240
79+ $ IP.arraysOf 240
7980 $ S.fromList list
8081 assert (xs == list)
8182
@@ -85,8 +86,8 @@ testFlattenArrays =
8586 forAll (vectorOf len (arbitrary :: Gen Int)) $ \list ->
8687 monadicIO $ do
8788 xs <- S.toList
88− $ Internal.concatMapU Internal.readU
89− $ Internal.arraysOf 240
89+ $ IP.concatMapU Internal.readU
90+ $ IP.arraysOf 240
9091 $ S.fromList list
9192 assert (xs == list)
9293
test/Main.hs+3−3
@@ -23,7 +23,7 @@ import Test.Hspec as H
2323import Streamly
2424import Streamly.Prelude ((.:), nil)
2525import qualified Streamly.Prelude as S
26−import qualified Streamly.Internal as Internal
26+import qualified Streamly.Internal.Prelude as IP
2727
2828singleton :: IsStream t => a -> t m a
2929singleton a = a .: nil
@@ -638,12 +638,12 @@ checkFoldrLaziness = do
638638 (return False) (S.fromList (2:4:5:undefined :: [Int]))
639639 `shouldReturn` True
640640
641− S.toList (Internal.foldrS (\x xs -> if odd x then return True else xs)
641+ S.toList (IP.foldrS (\x xs -> if odd x then return True else xs)
642642 (return False)
643643 $ (S.fromList (2:4:5:undefined) :: SerialT IO Int))
644644 `shouldReturn` [True]
645645
646− S.toList (Internal.foldrT (\x xs -> if odd x then return True else xs)
646+ S.toList (IP.foldrT (\x xs -> if odd x then return True else xs)
647647 (return False)
648648 $ (S.fromList (2:4:5:undefined) :: SerialT IO Int))
649649 `shouldReturn` [True]