Make this buildable again
This commit is contained in:
@@ -17,7 +17,7 @@ import Control.Monad
|
||||
import Control.Exception.Safe
|
||||
import Data.Functor
|
||||
import System.Posix.Files.ByteString
|
||||
import System.Posix.Directory.Foreign ( oExcl )
|
||||
import System.Posix.Foreign ( oExcl )
|
||||
import System.IO
|
||||
import "unix" System.Posix.IO.ByteString
|
||||
hiding ( openFd )
|
||||
@@ -149,8 +149,5 @@ captureOutStreams action =
|
||||
|
||||
-- | Create a new regular file in write-only mode. The file must not exist.
|
||||
createRegularFileFd :: FileMode -> Path b -> IO Fd
|
||||
createRegularFileFd fm dest = FD.openFd
|
||||
(toFilePath dest)
|
||||
WriteOnly
|
||||
[oExcl]
|
||||
(Just fm)
|
||||
createRegularFileFd fm dest =
|
||||
FD.openFd (toFilePath dest) WriteOnly [oExcl] (Just fm)
|
||||
|
||||
@@ -74,6 +74,3 @@ handleIO' :: IOErrorType -> (IOException -> IO ()) -> IO () -> IO ()
|
||||
handleIO' err handler =
|
||||
handleIO (\e -> if err == ioeGetErrorType e then handler e else ioError e)
|
||||
|
||||
hideError :: IOErrorType -> IO () -> IO ()
|
||||
hideError err = handleIO (\e -> if err == ioeGetErrorType e then pure () else ioError e)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user