aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/Error.hs
diff options
context:
space:
mode:
authorGravatar Ian Lynagh <igloo@earth.li>2007-07-22 00:29:56 +0000
committerGravatar Ian Lynagh <igloo@earth.li>2007-07-22 00:29:56 +0000
commit1061a6fa2ccc0038efd2caa70894087c880bb399 (patch)
treea0d23ed228adf85f2caa9dafe42ea41c694d488f /System/Posix/Error.hs
parent7dd3c79ed25fbafffe8822b83150a40e4f9bc9e3 (diff)
Move throwErrnoPath* functions to base:Foreign.C.Error
Diffstat (limited to 'System/Posix/Error.hs')
-rw-r--r--System/Posix/Error.hs25
1 files changed, 0 insertions, 25 deletions
diff --git a/System/Posix/Error.hs b/System/Posix/Error.hs
index e42648a..1f05b03 100644
--- a/System/Posix/Error.hs
+++ b/System/Posix/Error.hs
@@ -22,29 +22,4 @@ module System.Posix.Error (
) where
import Foreign.C.Error
-import Foreign.Ptr
-import Foreign.Marshal.Error ( void )
-throwErrnoPath :: String -> FilePath -> IO a
-throwErrnoPath loc path =
- do
- errno <- getErrno
- ioError (errnoToIOError loc errno Nothing (Just path))
-
-throwErrnoPathIf :: (a -> Bool) -> String -> FilePath -> IO a -> IO a
-throwErrnoPathIf pred loc path f =
- do
- res <- f
- if pred res then throwErrnoPath loc path else return res
-
-throwErrnoPathIf_ :: (a -> Bool) -> String -> FilePath -> IO a -> IO ()
-throwErrnoPathIf_ pred loc path f = void $ throwErrnoPathIf pred loc path f
-
-throwErrnoPathIfNull :: String -> FilePath -> IO (Ptr a) -> IO (Ptr a)
-throwErrnoPathIfNull = throwErrnoPathIf (== nullPtr)
-
-throwErrnoPathIfMinus1 :: Num a => String -> FilePath -> IO a -> IO a
-throwErrnoPathIfMinus1 = throwErrnoPathIf (== -1)
-
-throwErrnoPathIfMinus1_ :: Num a => String -> FilePath -> IO a -> IO ()
-throwErrnoPathIfMinus1_ = throwErrnoPathIf_ (== -1)