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_out = Inherit
|
||||||
, std_err = Inherit
|
, std_err = Inherit
|
||||||
}
|
}
|
||||||
(select, p')
|
(select, p') = case h of
|
||||||
| h == StdinHandle =
|
StdinHandle -> (stdinHandle, base { std_in = CreatePipe })
|
||||||
(stdinHandle, base { std_in = CreatePipe })
|
StdoutHandle -> (stdoutHandle, base { std_out = CreatePipe })
|
||||||
| h == StdoutHandle =
|
StderrHandle -> (stderrHandle, base { std_err = CreatePipe })
|
||||||
(stdoutHandle, base { std_out = CreatePipe })
|
|
||||||
| h == StderrHandle =
|
|
||||||
(stderrHandle, base { std_err = CreatePipe })
|
|
||||||
|
|
||||||
-- | Like withHandle, but passes (stdin, stdout) handles to the action.
|
-- | Like withHandle, but passes (stdin, stdout) handles to the action.
|
||||||
withIOHandles
|
withIOHandles
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue