[commit: packages/process] master: Remove obsolete Hugs CPP conditionals in `Internals.hs` (6323146)

git at git.haskell.org git at git.haskell.org
Sun Oct 20 16:18:06 UTC 2013


Repository : ssh://git@git.haskell.org/process

On branch  : master
Link       : http://git.haskell.org/packages/process.git/commitdiff/6323146ffb7cd1d7673c88f428e5c81532fca55e

>---------------------------------------------------------------

commit 6323146ffb7cd1d7673c88f428e5c81532fca55e
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Oct 20 17:39:03 2013 +0200

    Remove obsolete Hugs CPP conditionals in `Internals.hs`
    
    The Hugs CPP conditionals in `System.Process.Internals` make little
    sense, as that module is only listed in `exposed-modules` when
    `impl(ghc)` and moreover, it's `import` in `System.Process` is guarded
    by an `#ifndef __HUGS__`.
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


>---------------------------------------------------------------

6323146ffb7cd1d7673c88f428e5c81532fca55e
 System/Process/Internals.hs |   29 +++--------------------------
 1 file changed, 3 insertions(+), 26 deletions(-)

diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs
index 8771bde..5a89df2 100644
--- a/System/Process/Internals.hs
+++ b/System/Process/Internals.hs
@@ -18,9 +18,7 @@
 --
 -----------------------------------------------------------------------------
 
--- #hide
 module System.Process.Internals (
-#ifndef __HUGS__
         ProcessHandle(..), ProcessHandle__(..), 
         PHANDLE, closePHANDLE, mkProcessHandle, 
         modifyProcessHandle, withProcessHandle,
@@ -30,19 +28,14 @@ module System.Process.Internals (
         runGenProcess_,
 #endif
 #if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
-         pPrPr_disableITimers, c_execvpe,
+        pPrPr_disableITimers, c_execvpe,
         ignoreSignal, defaultSignal,
 #endif
-#endif
         withFilePathException, withCEnvironment,
         translate,
-
-#ifndef __HUGS__
         fdToHandle,
-#endif
   ) where
 
-#ifndef __HUGS__
 #if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
 import Control.Monad
 import Data.Char
@@ -50,7 +43,6 @@ import System.Posix.Types
 import System.Posix.Process.Internals ( pPrPr_disableITimers, c_execvpe )
 import System.IO
 #endif
-#endif
 
 import Control.Concurrent
 import Control.Exception
@@ -61,8 +53,7 @@ import Foreign.Ptr
 import Foreign.Storable
 import System.IO.Unsafe
 
-# ifdef __GLASGOW_HASKELL__
-
+#ifdef __GLASGOW_HASKELL__
 import System.Posix.Internals
 import GHC.IO.Exception
 import GHC.IO.Encoding
@@ -77,12 +68,7 @@ import Data.Typeable
 import GHC.IO.IOMode
 import System.Win32.DebugApi (PHANDLE)
 #endif
-
-# elif __HUGS__
-
-import Hugs.Exception   ( IOException(..) )
-
-# endif
+#endif
 
 #if defined(mingw32_HOST_OS)
 import System.Directory         ( doesFileExist )
@@ -90,10 +76,6 @@ import System.Environment       ( getEnv )
 import System.FilePath
 #endif
 
-#ifdef __HUGS__
-{-# CFILES cbits/execvpe.c  #-}
-#endif
-
 #include "HsProcessConfig.h"
 #include "processFlags.h"
 
@@ -107,7 +89,6 @@ import System.FilePath
 # endif
 #endif
 
-#ifndef __HUGS__
 -- ----------------------------------------------------------------------------
 -- ProcessHandle type
 
@@ -174,7 +155,6 @@ foreign import WINDOWS_CCONV unsafe "CloseHandle"
         :: PHANDLE
         -> IO ()
 #endif
-#endif /* !__HUGS__ */
 
 -- ----------------------------------------------------------------------------
 
@@ -421,7 +401,6 @@ pfdToHandle pfd mode = do
 #endif
   mkHandleFromFD fD' fd_type filepath mode False {-is_socket-} (Just enc)
 
-#ifndef __HUGS__
 -- ----------------------------------------------------------------------------
 -- commandToProcess
 
@@ -502,8 +481,6 @@ findCommandInterpreter = do
       Just cmd -> return cmd
 #endif
 
-#endif /* __HUGS__ */
-
 -- ------------------------------------------------------------------------
 -- Escaping commands for shells
 



More information about the ghc-commits mailing list