readResultExit :: CResult -> IO ResultExit
readResultExit resultC = do
  exitCode   <- getExitCode   resultC
  exitSignal <- getExitSignal resultC
  return $ case (exitCode, exitSignal) of
    (0, _)  -> ExitSuccess
    (_, "") -> ExitFailure exitCode
    _       -> ExitSignal exitSignal
readResultExit :: CResult -> IO ResultExit
readResultExit resultC = do
  exitCode   <- getExitCode   resultC
  exitSignal <- getExitSignal resultC
  return $ case (exitCode, exitSignal) of
    (0, _)  -> ExitSuccess
    (_, "") -> ExitFailure exitCode
    _       -> ExitSignal exitSignal
readResultExit resultC = do
  exitCode   <- getExitCode   resultC
  exitSignal <- getExitSignal resultC
  return $ case (exitCode, exitSignal) of
    (0, _)  -> ExitSuccess
    (_, "") -> ExitFailure exitCode
    _       -> ExitSignal exitSignal