fix bogus ghc 8.6.3 build warning
ghc warned that the guards did not cover all values of h, but they clearly do, and when rewritten as a case statement the warning goes away. Probably a ghc bug, but I kind of prefer the case statement over the guards anyway.
This commit is contained in:
parent
5bd618a1f6
commit
5480b3a9af
1 changed files with 4 additions and 7 deletions
|
@ -178,13 +178,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
|
||||
|
|
Loading…
Add table
Reference in a new issue