[commit: packages/process] master: Clean up import and export lists (b39e340)
git at git.haskell.org
git at git.haskell.org
Sun Mar 30 15:20:27 UTC 2014
Repository : ssh://git@git.haskell.org/process
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/b39e340bb1fa887842e99db9824906858515cdf7/process
>---------------------------------------------------------------
commit b39e340bb1fa887842e99db9824906858515cdf7
Author: Johan Tibell <johan.tibell at gmail.com>
Date: Sun Mar 30 17:05:23 2014 +0200
Clean up import and export lists
Imports are now sorted alphabetically and shared imports come before
compiler/OS specific ones.
Import lists now use consistent indentation.
Nested CPP if statements are now indented so it's possible to match up
the ifs with the ends.
>---------------------------------------------------------------
b39e340bb1fa887842e99db9824906858515cdf7
System/Process.hs | 103 ++++++++++++++++++++++---------------------
System/Process/Internals.hs | 52 +++++++++++-----------
2 files changed, 78 insertions(+), 77 deletions(-)
diff --git a/System/Process.hs b/System/Process.hs
index 19c500c..87e9a41 100644
--- a/System/Process.hs
+++ b/System/Process.hs
@@ -35,73 +35,74 @@
-}
module System.Process (
- -- * Running sub-processes
- createProcess,
- shell, proc,
- CreateProcess(..),
- CmdSpec(..),
- StdStream(..),
- ProcessHandle,
-
- -- ** Simpler functions for common tasks
- callProcess,
- callCommand,
- spawnProcess,
- spawnCommand,
- readProcess,
- readProcessWithExitCode,
-
- -- ** Related utilities
- showCommandForUser,
-
- -- ** Control-C handling on Unix
- -- $ctlc-handling
-
- -- * Process completion
- waitForProcess,
- getProcessExitCode,
- terminateProcess,
- interruptProcessGroupOf,
-
- -- * Old deprecated functions
- -- | These functions pre-date 'createProcess' which is much more
- -- flexible.
- runProcess,
- runCommand,
- runInteractiveProcess,
- runInteractiveCommand,
- system,
- rawSystem,
- ) where
+ -- * Running sub-processes
+ createProcess,
+ shell, proc,
+ CreateProcess(..),
+ CmdSpec(..),
+ StdStream(..),
+ ProcessHandle,
+
+ -- ** Simpler functions for common tasks
+ callProcess,
+ callCommand,
+ spawnProcess,
+ spawnCommand,
+ readProcess,
+ readProcessWithExitCode,
+
+ -- ** Related utilities
+ showCommandForUser,
+
+ -- ** Control-C handling on Unix
+ -- $ctlc-handling
+
+ -- * Process completion
+ waitForProcess,
+ getProcessExitCode,
+ terminateProcess,
+ interruptProcessGroupOf,
+
+ -- * Old deprecated functions
+ -- | These functions pre-date 'createProcess' which is much more
+ -- flexible.
+ runProcess,
+ runCommand,
+ runInteractiveProcess,
+ runInteractiveCommand,
+ system,
+ rawSystem,
+ ) where
import Prelude hiding (mapM)
import System.Process.Internals
-import Control.Exception (SomeException, mask, try, throwIO)
+import Control.Concurrent
import Control.DeepSeq (rnf)
-import System.IO.Error (mkIOError, ioeSetErrorString)
-#if !defined(mingw32_HOST_OS)
-import System.Posix.Types
-import System.Posix.Process (getProcessGroupIDOf)
-#endif
+import Control.Exception (SomeException, mask, try, throwIO)
import qualified Control.Exception as C
-import Control.Concurrent
import Control.Monad
+import Data.Maybe
import Foreign
import Foreign.C
-import System.IO
-import Data.Maybe
import System.Exit ( ExitCode(..) )
+import System.IO
+import System.IO.Error (mkIOError, ioeSetErrorString)
+
+#if !defined(mingw32_HOST_OS)
+import System.Posix.Process (getProcessGroupIDOf)
+import System.Posix.Types
+#endif
#ifdef __GLASGOW_HASKELL__
import GHC.IO.Exception ( ioException, IOErrorType(..), IOException(..) )
-#if defined(mingw32_HOST_OS)
-import System.Win32.Process (getProcessId)
+# if defined(mingw32_HOST_OS)
import System.Win32.Console (generateConsoleCtrlEvent, cTRL_BREAK_EVENT)
-#else
+import System.Win32.Process (getProcessId)
+# else
import System.Posix.Signals
-#endif
+# endif
#endif
-- ----------------------------------------------------------------------------
diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs
index c4f8797..9dc2af7 100644
--- a/System/Process/Internals.hs
+++ b/System/Process/Internals.hs
@@ -20,33 +20,25 @@
-----------------------------------------------------------------------------
module System.Process.Internals (
- ProcessHandle(..), ProcessHandle__(..),
- PHANDLE, closePHANDLE, mkProcessHandle,
- modifyProcessHandle, withProcessHandle,
+ ProcessHandle(..), ProcessHandle__(..),
+ PHANDLE, closePHANDLE, mkProcessHandle,
+ modifyProcessHandle, withProcessHandle,
#ifdef __GLASGOW_HASKELL__
- CreateProcess(..),
- CmdSpec(..), StdStream(..),
- createProcess_,
- runGenProcess_, --deprecated
+ CreateProcess(..),
+ CmdSpec(..), StdStream(..),
+ createProcess_,
+ runGenProcess_, --deprecated
#endif
- startDelegateControlC,
- endDelegateControlC,
+ startDelegateControlC,
+ endDelegateControlC,
#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
- pPrPr_disableITimers, c_execvpe,
- ignoreSignal, defaultSignal,
-#endif
- withFilePathException, withCEnvironment,
- translate,
- fdToHandle,
- ) where
-
-#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
-import Control.Monad
-import Data.Char
-import System.Posix.Types
-import System.Posix.Process.Internals ( pPrPr_disableITimers, c_execvpe )
-import System.IO
+ pPrPr_disableITimers, c_execvpe,
+ ignoreSignal, defaultSignal,
#endif
+ withFilePathException, withCEnvironment,
+ translate,
+ fdToHandle,
+ ) where
import Control.Concurrent
import Control.Exception
@@ -57,6 +49,14 @@ import Foreign.Ptr
import Foreign.Storable
import System.IO.Unsafe
+#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
+import Control.Monad
+import Data.Char
+import System.IO
+import System.Posix.Process.Internals ( pPrPr_disableITimers, c_execvpe )
+import System.Posix.Types
+#endif
+
#ifdef __GLASGOW_HASKELL__
import System.Posix.Internals
import GHC.IO.Exception
@@ -68,12 +68,12 @@ import GHC.IO.Handle.Internals
import GHC.IO.Handle.Types hiding (ClosedHandle)
import System.IO.Error
import Data.Typeable
-#if defined(mingw32_HOST_OS)
+# if defined(mingw32_HOST_OS)
import GHC.IO.IOMode
import System.Win32.DebugApi (PHANDLE)
-#else
+# else
import System.Posix.Signals as Sig
-#endif
+# endif
#endif
#if defined(mingw32_HOST_OS)
More information about the ghc-commits
mailing list