on master help sign in
Use Internal.Prelude module in place of Internal
b051167Harendra Kumar
src/Streamly/Internal.hs−41
@@ -22,54 +22,14 @@ module Streamly.Internal
22 inspectMode
22 inspectMode
23
23
24 -- * Streamly.Prelude Experimental Exports
24 -- * Streamly.Prelude Experimental Exports
25− , foldrS
26− , foldrT
27− , prescanl'
28− , prescanlM'
29−
30− , toListRev
31 , toListRevF
25 , 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−
52 , tapAsync
26 , tapAsync
53
27
54− , classifySessionsOf
55− , classifySessionsBy
56− , classifyKeepAliveSessions
57−
58− , append
59− , interleave
60− , interleaveFst
61− , interleaveMin
62− , roundrobin
63 , wSerialFst
28 , wSerialFst
64 , wSerialMin
29 , wSerialMin
65 , parallelFst
30 , parallelFst
66 , parallelMin
31 , parallelMin
67
32
68− , concatMapU
69− , concatUnfoldInterleave
70− , concatUnfoldRoundrobin
71− , intercalateSuffix
72−
73 -- * Streamly.Fold Experimental Exports
33 -- * Streamly.Fold Experimental Exports
74 , Fold (..)
34 , Fold (..)
75 , rollingHash
35 , rollingHash
@@ -107,4 +67,3 @@ import Streamly.Unfold (fromList)
107
67
108import Streamly.Fold.Internal
68import Streamly.Fold.Internal
109import Streamly.Fold.Types
69import Streamly.Fold.Types
110−import Streamly.Internal.Prelude hiding (fromList)
test/Arrays.hs+4−3
@@ -14,6 +14,7 @@ import Test.Hspec as H
14import qualified Streamly.Memory.Array as A
14import qualified Streamly.Memory.Array as A
15import qualified Streamly.Prelude as S
15import qualified Streamly.Prelude as S
16import qualified Streamly.Internal as Internal
16import qualified Streamly.Internal as Internal
17+import qualified Streamly.Internal.Prelude as IP
17
18
18-- Coverage build takes too long with default number of tests
19-- Coverage build takes too long with default number of tests
19maxTestCount :: Int
20maxTestCount :: Int
@@ -75,7 +76,7 @@ testArraysOf =
75 monadicIO $ do
76 monadicIO $ do
76 xs <- S.toList
77 xs <- S.toList
77 $ S.concatMap A.read
78 $ S.concatMap A.read
78− $ Internal.arraysOf 240
79+ $ IP.arraysOf 240
79 $ S.fromList list
80 $ S.fromList list
80 assert (xs == list)
81 assert (xs == list)
81
82
@@ -85,8 +86,8 @@ testFlattenArrays =
85 forAll (vectorOf len (arbitrary :: Gen Int)) $ \list ->
86 forAll (vectorOf len (arbitrary :: Gen Int)) $ \list ->
86 monadicIO $ do
87 monadicIO $ do
87 xs <- S.toList
88 xs <- S.toList
88− $ Internal.concatMapU Internal.readU
89+ $ IP.concatMapU Internal.readU
89− $ Internal.arraysOf 240
90+ $ IP.arraysOf 240
90 $ S.fromList list
91 $ S.fromList list
91 assert (xs == list)
92 assert (xs == list)
92
93
test/Main.hs+3−3
@@ -23,7 +23,7 @@ import Test.Hspec as H
23import Streamly
23import Streamly
24import Streamly.Prelude ((.:), nil)
24import Streamly.Prelude ((.:), nil)
25import qualified Streamly.Prelude as S
25import qualified Streamly.Prelude as S
26−import qualified Streamly.Internal as Internal
26+import qualified Streamly.Internal.Prelude as IP
27
27
28singleton :: IsStream t => a -> t m a
28singleton :: IsStream t => a -> t m a
29singleton a = a .: nil
29singleton a = a .: nil
@@ -638,12 +638,12 @@ checkFoldrLaziness = do
638 (return False) (S.fromList (2:4:5:undefined :: [Int]))
638 (return False) (S.fromList (2:4:5:undefined :: [Int]))
639 `shouldReturn` True
639 `shouldReturn` True
640
640
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)
642 (return False)
642 (return False)
643 $ (S.fromList (2:4:5:undefined) :: SerialT IO Int))
643 $ (S.fromList (2:4:5:undefined) :: SerialT IO Int))
644 `shouldReturn` [True]
644 `shouldReturn` [True]
645
645
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)
647 (return False)
647 (return False)
648 $ (S.fromList (2:4:5:undefined) :: SerialT IO Int))
648 $ (S.fromList (2:4:5:undefined) :: SerialT IO Int))
649 `shouldReturn` [True]
649 `shouldReturn` [True]