@@ -1,7 +1,7 @@
1#include "inline.hs"
1#include "inline.hs"
4−-- Module : Streamly.FileSystem.FDIO
4+-- Module : Streamly.Internal.FileSystem.FDIO
5-- Copyright : (c) 2019 Composewell Technologies
5-- Copyright : (c) 2019 Composewell Technologies
6-- Copyright : (c) 1994-2008 The University of Glasgow
6-- Copyright : (c) 1994-2008 The University of Glasgow
@@ -13,7 +13,7 @@
13-- Low level IO routines interfacing the operating system.
13-- Low level IO routines interfacing the operating system.
16−module Streamly.FileSystem.FDIO
16+module Streamly.Internal.FileSystem.FDIO
18 , writeAll
18 , writeAll
19 , IOVec (..)
19 , IOVec (..)
@@ -31,7 +31,7 @@ import Foreign.C.Error (throwErrnoIfMinus1RetryMayBlock)
31import Foreign.C.Types (CBool(..))
31import Foreign.C.Types (CBool(..))
33import System.Posix.Internals (c_write, c_safe_write)
33import System.Posix.Internals (c_write, c_safe_write)
34−import Streamly.FileSystem.IOVec (c_writev, c_safe_writev)
34+import Streamly.Internal.FileSystem.IOVec (c_writev, c_safe_writev)
37import Foreign.C.Types (CSize(..), CInt(..))
37import Foreign.C.Types (CSize(..), CInt(..))
@@ -40,7 +40,7 @@ import Foreign.Ptr (plusPtr, Ptr)
41import GHC.IO.FD (FD(..))
41import GHC.IO.FD (FD(..))
43−import Streamly.FileSystem.IOVec (IOVec(..))
43+import Streamly.Internal.FileSystem.IOVec (IOVec(..))
45-------------------------------------------------------------------------------
45-------------------------------------------------------------------------------
46-- IO Routines
46-- IO Routines
@@ -181,7 +181,7 @@ writeNonBlocking loc !fd !buf !off !len
181-- suspend the Haskell thread until write can proceed. Returns the actual
181-- suspend the Haskell thread until write can proceed. Returns the actual
182-- amount of data written.
182-- amount of data written.
183write :: FD -> Ptr Word8 -> Int -> CSize -> IO CInt
183write :: FD -> Ptr Word8 -> Int -> CSize -> IO CInt
184−write = writeNonBlocking "Streamly.FileSystem.FDIO"
184+write = writeNonBlocking "Streamly.Internal.FileSystem.FDIO"
186-- XXX sendAll for sockets has a similar code, we can deduplicate the two.
186-- XXX sendAll for sockets has a similar code, we can deduplicate the two.
187-- XXX we need to check the errno to determine if the loop should continue. For
187-- XXX we need to check the errno to determine if the loop should continue. For
@@ -205,7 +205,7 @@ writeAll fd ptr bytes = do
205-- write will not block the OS thread, it may suspend the Haskell thread until
205-- write will not block the OS thread, it may suspend the Haskell thread until
206-- write can proceed. Returns the actual amount of data written.
206-- write can proceed. Returns the actual amount of data written.
207writev :: FD -> Ptr IOVec -> Int -> IO CInt
207writev :: FD -> Ptr IOVec -> Int -> IO CInt
208−writev = writevNonBlocking "Streamly.FileSystem.FDIO"
208+writev = writevNonBlocking "Streamly.Internal.FileSystem.FDIO"
210-- XXX incomplete
210-- XXX incomplete
211-- | Keep writing an iovec in a loop until all the iovec entries are written.
211-- | Keep writing an iovec in a loop until all the iovec entries are written.