[commit: packages/process] master: Add TODO notes on what should be marked DEPRECATED later (ebdb5ae)

git at git.haskell.org git at git.haskell.org
Wed Nov 20 21:09:09 UTC 2013


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ebdb5ae477cf955b272ee2a5fea24768202bdb46/process

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

commit ebdb5ae477cf955b272ee2a5fea24768202bdb46
Author: Duncan Coutts <duncan at well-typed.com>
Date:   Fri Nov 15 15:07:34 2013 +0000

    Add TODO notes on what should be marked DEPRECATED later
    
    We don't want to do it immediately because some of the replacements have
    not been around for long. There's no hurry, can do it in a release or
    two.
    
    Authored-by: Duncan Coutts <duncan at well-typed.com>
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


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

ebdb5ae477cf955b272ee2a5fea24768202bdb46
 System/Process.hs |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/System/Process.hs b/System/Process.hs
index 891bb63..39c12c8 100644
--- a/System/Process.hs
+++ b/System/Process.hs
@@ -628,10 +628,17 @@ foreign import ccall interruptible "waitForProcess" -- NB. safe - can block
 -- Old deprecated variants
 -- ----------------------------------------------------------------------------
 
+-- TODO: We're not going to mark these functions as DEPRECATED immediately in
+-- process-1.2.0.0. That's because some of their replacements have not been
+-- around for all that long. But they should eventually be marked with a
+-- suitable DEPRECATED pragma after a release or two.
+
 
 -- ----------------------------------------------------------------------------
 -- runCommand
 
+--TODO: in a later release {-# DEPRECATED runCommand "Use 'spawnCommand' instead" #-}
+
 {- | Runs a command using the shell.
  -}
 runCommand
@@ -646,6 +653,8 @@ runCommand string = do
 -- ----------------------------------------------------------------------------
 -- runProcess
 
+--TODO: in a later release {-# DEPRECATED runProcess "Use 'spawnProcess' or 'createProcess' instead" #-}
+
 {- | Runs a raw command, optionally specifying 'Handle's from which to
      take the @stdin@, @stdout@ and @stderr@ channels for the new
      process (otherwise these handles are inherited from the current
@@ -693,6 +702,8 @@ runProcess cmd args mb_cwd mb_env mb_stdin mb_stdout mb_stderr = do
 -- ----------------------------------------------------------------------------
 -- runInteractiveCommand
 
+--TODO: in a later release {-# DEPRECATED runInteractiveCommand "Use 'createProcess' instead" #-}
+
 {- | Runs a command using the shell, and returns 'Handle's that may
      be used to communicate with the process via its @stdin@, @stdout@,
      and @stderr@ respectively. The 'Handle's are initially in binary
@@ -709,6 +720,8 @@ runInteractiveCommand string =
 -- ----------------------------------------------------------------------------
 -- runInteractiveProcess
 
+--TODO: in a later release {-# DEPRECATED runInteractiveCommand "Use 'createProcess' instead" #-}
+
 {- | Runs a raw command, and returns 'Handle's that may be used to communicate
      with the process via its @stdin@, @stdout@ and @stderr@ respectively.
 
@@ -748,6 +761,8 @@ runInteractiveProcess1 fun cmd = do
 -- ---------------------------------------------------------------------------
 -- system & rawSystem
 
+--TODO: in a later release {-# DEPRECATED system "Use 'callCommand' (or 'spawnCommand' and 'waitForProcess') instead" #-}
+
 {-|
 Computation @system cmd@ returns the exit code produced when the
 operating system runs the shell command @cmd at .
@@ -779,6 +794,8 @@ system str = do
 #endif  /* __GLASGOW_HASKELL__ */
 
 
+--TODO: in a later release {-# DEPRECATED rawSystem "Use 'callProcess' (or 'spawnProcess' and 'waitForProcess') instead" #-}
+
 {-|
 The computation @'rawSystem' cmd args@ runs the operating system command
 @cmd@ in such a way that it receives as arguments the @args@ strings



More information about the ghc-commits mailing list