From: Ian Lynagh Date: Mon, 13 Dec 2010 23:58:37 +0000 (+0000) Subject: Fix build on Windows X-Git-Url: http://git.megacz.com/?p=ghc-base.git;a=commitdiff_plain;h=938137ef0feb20656a745ae3e34803de3a825515 Fix build on Windows --- 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