diff options
author | Benjamin Barenblat <bbarenblat@gmail.com> | 2022-01-19 13:48:47 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbarenblat@gmail.com> | 2022-01-19 13:48:47 -0500 |
commit | 1c08bb700083d67ce5fbf5c955963bfed8150e3a (patch) | |
tree | a918e4ff933076c4b2a9ce0a9d06589086029719 | |
parent | d4f2b262a2afcc658c35694a089a983b9558b71a (diff) |
Convince GHC that a certain pattern match is exhaustive
-rw-r--r-- | COPYRIGHT | 4 | ||||
-rw-r--r-- | Utility/Process.hs | 11 |
2 files changed, 8 insertions, 7 deletions
@@ -11,8 +11,8 @@ Copyright: © 2011 Joey Hess <id@joeyh.name> © 2014 Robie Basak <robie@justgohome.co.uk> License: GPL-3+ -Files: Utility/HumanTime.hs -Copyright: 2012-2013 Joey Hess <id@joeyh.name> +Files: Utility/HumanTime.hs Utility/Process.hs +Copyright: 2012-2015 Joey Hess <id@joeyh.name> 2022 Benjamin Barenblat <bbarenblat@gmail.com> License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use diff --git a/Utility/Process.hs b/Utility/Process.hs index 1807a1335..90ddce81b 100644 --- a/Utility/Process.hs +++ b/Utility/Process.hs @@ -2,8 +2,9 @@ - processes, and logging. - - Copyright 2012-2015 Joey Hess <id@joeyh.name> + - Copyright 2022 Benjamin Barenblat <bbarenblat@gmail.com> - - - License: BSD-2-clause + - License: Apache-2.0 -} {-# LANGUAGE CPP, Rank2Types #-} @@ -178,12 +179,12 @@ withHandle h creator p a = creator p' $ a . select , std_out = Inherit , std_err = Inherit } - (select, p') - | h == StdinHandle = + (select, p') = case h of + StdinHandle -> (stdinHandle, base { std_in = CreatePipe }) - | h == StdoutHandle = + StdoutHandle -> (stdoutHandle, base { std_out = CreatePipe }) - | h == StderrHandle = + StderrHandle -> (stderrHandle, base { std_err = CreatePipe }) -- | Like withHandle, but passes (stdin, stdout) handles to the action. |