Skip to content

Commit

Permalink
Fix Werror build
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed May 2, 2024
1 parent 8946804 commit bfcdd23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/CSVParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import qualified Streamly.Data.Fold as Fold
import qualified Streamly.Data.Stream as Stream
import qualified Streamly.FileSystem.Handle as Handle
import qualified System.IO as IO
import qualified Streamly.Internal.Data.Array.Stream as ArrayStream (splitOn)
import qualified Streamly.Internal.Data.Array as Array (compactOnByte)

main :: IO ()
main = do
inFile <- fmap head getArgs
src <- IO.openFile inFile ReadMode

Handle.readChunks src -- Stream IO (Array Word8)
& ArrayStream.splitOn 10 -- Stream IO (Array Word8)
& Array.compactOnByte 10 -- Stream IO (Array Word8)
& Stream.fold (Fold.drainMapM parseLine) -- IO ()

where
Expand Down
5 changes: 2 additions & 3 deletions examples/CoreUtilsHandle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import qualified Streamly.Data.Fold as Fold
import qualified Streamly.Data.Stream as Stream
import qualified Streamly.FileSystem.Handle as Handle
import qualified Streamly.Unicode.Stream as Unicode

import qualified Streamly.Internal.Data.Array.Stream as ArrayStream (splitOn)
import qualified Streamly.Internal.Data.Array as Array (compactOnByte)

-- | Read the contents of a file to stdout.
--
Expand Down Expand Up @@ -74,7 +73,7 @@ wclChar src =
wcl :: Handle -> IO Int
wcl src =
Handle.readChunks src -- Stream IO (Array Word8)
& ArrayStream.splitOn 10 -- Stream IO (Array Word8)
& Array.compactOnByte 10 -- Stream IO (Array Word8)
& Stream.fold Fold.length -- IO ()

main :: IO ()
Expand Down

0 comments on commit bfcdd23

Please sign in to comment.