diff options
author | Ian Lynagh <igloo@earth.li> | 2007-04-04 15:59:30 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-04-04 15:59:30 +0000 |
commit | 961ff2adbf3a9243ddcfabc7dc328393ca47f1fa (patch) | |
tree | af2c01f99be33c8bf3dfb9ec01c3f0e517069896 /System/Posix/Temp.hsc | |
parent | 9d6c0795ddb0df2ef08685e03ae4d749b478e029 (diff) |
Don't use Fd/FD in foreign decls
Using CInt makes it much easier to verify that it is right, and we won't
get caught out by possible newtype switches between CInt/Int.
Diffstat (limited to 'System/Posix/Temp.hsc')
-rw-r--r-- | System/Posix/Temp.hsc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/System/Posix/Temp.hsc b/System/Posix/Temp.hsc index 861fc76..8c76290 100644 --- a/System/Posix/Temp.hsc +++ b/System/Posix/Temp.hsc @@ -41,7 +41,7 @@ mkstemp template = do withCString template $ \ ptr -> do fd <- throwErrnoIfMinus1 "mkstemp" (c_mkstemp ptr) name <- peekCString ptr - h <- fdToHandle fd + h <- fdToHandle (Fd fd) return (name, h) #else name <- mktemp template @@ -62,5 +62,5 @@ foreign import ccall unsafe "mktemp" #endif foreign import ccall unsafe "mkstemp" - c_mkstemp :: CString -> IO Fd + c_mkstemp :: CString -> IO CInt |