summaryrefslogtreecommitdiff
path: root/src/Utility
diff options
context:
space:
mode:
authorJoey Hess2018-12-30 15:08:00 -0400
committerJoey Hess2018-12-30 15:08:00 -0400
commit84330a9a6dcd1dd2f2afa3f0ad5a8f07bd26f9d5 (patch)
tree8d31499a1ae4245a8098fcaa56f7107434b18de6 /src/Utility
parent287887cff4e43b64a592121aaa7bc371433dd686 (diff)
parentf0a3ad02488ea89088cc06d112194d9db3b751e3 (diff)
Merge branch 'master' into joeyconfig
Diffstat (limited to 'src/Utility')
-rw-r--r--src/Utility/Process.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Utility/Process.hs b/src/Utility/Process.hs
index 6d981cb5..48e03f41 100644
--- a/src/Utility/Process.hs
+++ b/src/Utility/Process.hs
@@ -248,13 +248,10 @@ withHandle h creator p a = creator p' $ a . select
, std_out = Inherit
, std_err = Inherit
}
- (select, p')
- | h == StdinHandle =
- (stdinHandle, base { std_in = CreatePipe })
- | h == StdoutHandle =
- (stdoutHandle, base { std_out = CreatePipe })
- | h == StderrHandle =
- (stderrHandle, base { std_err = CreatePipe })
+ (select, p') = case h of
+ StdinHandle -> (stdinHandle, base { std_in = CreatePipe })
+ StdoutHandle -> (stdoutHandle, base { std_out = CreatePipe })
+ StderrHandle -> (stderrHandle, base { std_err = CreatePipe })
-- | Like withHandle, but passes (stdin, stdout) handles to the action.
withIOHandles