@@ -63,6 +63,7 @@ import qualified Streamly.Internal.Prelude as S
63import qualified Streamly.Fold as FL
63import qualified Streamly.Fold as FL
64import qualified Streamly.Data.String as SS
64import qualified Streamly.Data.String as SS
65import qualified Streamly.Internal as Internal
65import qualified Streamly.Internal as Internal
66+import qualified Streamly.Internal.Prelude as IP
66import qualified Streamly.Streams.StreamD as D
67import qualified Streamly.Streams.StreamD as D
68#ifdef INSPECTION
69#ifdef INSPECTION
@@ -134,7 +135,7 @@ countLinesU inh =
135 $ SS.foldLines FL.drain
136 $ SS.foldLines FL.drain
136 $ SS.decodeChar8
137 $ SS.decodeChar8
137− $ Internal.concatMapU Internal.readU (FH.readArrays inh)
138+ $ IP.concatMapU Internal.readU (FH.readArrays inh)
139#ifdef INSPECTION
140#ifdef INSPECTION
140inspect $ hasNoTypeClasses 'countLinesU
141inspect $ hasNoTypeClasses 'countLinesU
@@ -343,7 +344,7 @@ isSp = isSpace . chr . fromIntegral
343wordsUnwordsCopyWord8 :: Handle -> Handle -> IO ()
344wordsUnwordsCopyWord8 :: Handle -> Handle -> IO ()
344wordsUnwordsCopyWord8 inh outh =
345wordsUnwordsCopyWord8 inh outh =
345 S.runFold (FH.write outh)
346 S.runFold (FH.write outh)
346− $ Internal.concatMapU Internal.fromList
347+ $ IP.concatMapU Internal.fromList
347 $ S.intersperse [32]
348 $ S.intersperse [32]
348 $ S.wordsBy isSp FL.toList
349 $ S.wordsBy isSp FL.toList
349 $ FH.read inh
350 $ FH.read inh
@@ -360,7 +361,7 @@ wordsUnwordsCopy :: Handle -> Handle -> IO ()
360wordsUnwordsCopy inh outh =
361wordsUnwordsCopy inh outh =
361 S.runFold (FH.write outh)
362 S.runFold (FH.write outh)
362 $ SS.encodeChar8
363 $ SS.encodeChar8
363− $ Internal.concatMapU Internal.fromList
364+ $ IP.concatMapU Internal.fromList
364 $ S.intersperse " "
365 $ S.intersperse " "
365 -- Array allocation is too expensive for such small strings. So just use
366 -- Array allocation is too expensive for such small strings. So just use
366 -- lists instead.
367 -- lists instead.
@@ -439,7 +440,7 @@ inspect $ 'wordsBy `hasNoType` ''D.ConcatMapUState
439{-# INLINE splitOnSeq #-}
440{-# INLINE splitOnSeq #-}
440splitOnSeq :: String -> Handle -> IO Int
441splitOnSeq :: String -> Handle -> IO Int
441splitOnSeq str inh =
442splitOnSeq str inh =
442− (S.length $ Internal.splitOnSeq (toarr str) FL.drain
443+ (S.length $ IP.splitOnSeq (toarr str) FL.drain
443 $ FH.read inh) -- >>= print
444 $ FH.read inh) -- >>= print
445#ifdef INSPECTION
446#ifdef INSPECTION
@@ -453,7 +454,7 @@ inspect $ hasNoTypeClasses 'splitOnSeq
453{-# INLINE splitOnSeqUtf8 #-}
454{-# INLINE splitOnSeqUtf8 #-}
454splitOnSeqUtf8 :: String -> Handle -> IO Int
455splitOnSeqUtf8 :: String -> Handle -> IO Int
455splitOnSeqUtf8 str inh =
456splitOnSeqUtf8 str inh =
456− (S.length $ Internal.splitOnSeq (A.fromList str) FL.drain
457+ (S.length $ IP.splitOnSeq (A.fromList str) FL.drain
457 $ SS.decodeUtf8ArraysLenient
458 $ SS.decodeUtf8ArraysLenient
458 $ FH.readArrays inh) -- >>= print
459 $ FH.readArrays inh) -- >>= print
@@ -461,7 +462,7 @@ splitOnSeqUtf8 str inh =
461{-# INLINE splitOnSuffixSeq #-}
462{-# INLINE splitOnSuffixSeq #-}
462splitOnSuffixSeq :: String -> Handle -> IO Int
463splitOnSuffixSeq :: String -> Handle -> IO Int
463splitOnSuffixSeq str inh =
464splitOnSuffixSeq str inh =
464− (S.length $ Internal.splitOnSuffixSeq (toarr str) FL.drain
465+ (S.length $ IP.splitOnSuffixSeq (toarr str) FL.drain
465 $ FH.read inh) -- >>= print
466 $ FH.read inh) -- >>= print
467#ifdef INSPECTION
468#ifdef INSPECTION