From 938137ef0feb20656a745ae3e34803de3a825515 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Mon, 13 Dec 2010 23:58:37 +0000 Subject: [PATCH] Fix build on Windows --- GHC/IO/FD.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/GHC/IO/FD.hs b/GHC/IO/FD.hs index 3ba155e..659f610 100644 --- a/GHC/IO/FD.hs +++ b/GHC/IO/FD.hs @@ -279,17 +279,17 @@ stderr = stdFD 2 close :: FD -> IO () close fd = #ifndef mingw32_HOST_OS - (flip finally) (release fd) $ do + (flip finally) (release fd) $ #endif - let closer realFd = - throwErrnoIfMinus1Retry_ "GHC.IO.FD.close" $ + do let closer realFd = + throwErrnoIfMinus1Retry_ "GHC.IO.FD.close" $ #ifdef mingw32_HOST_OS - if fdIsSocket fd then - c_closesocket (fromIntegral realFd) - else + if fdIsSocket fd then + c_closesocket (fromIntegral realFd) + else #endif - c_close (fromIntegral realFd) - closeFdWith closer (fromIntegral (fdFD fd)) + c_close (fromIntegral realFd) + closeFdWith closer (fromIntegral (fdFD fd)) release :: FD -> IO () #ifdef mingw32_HOST_OS -- 1.7.10.4