Commit 6323146f authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

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's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent 6127c90c
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment