readAllFromProcess :: FilePath -> [String] -> Text -> IO (Either Text (Text,Text))
readAllFromProcess program flags input = do
  (code,out,err) <- readProcessWithExitCode program flags input
  return $ case code of
    ExitFailure _ -> Left err
    ExitSuccess   -> Right (err, out)

-- | Generically show something.
readAllFromProcess :: FilePath -> [String] -> Text -> IO (Either Text (Text,Text))
readAllFromProcess program flags input = do
  (code,out,err) <- readProcessWithExitCode program flags input
  return $ case code of
    ExitFailure _ -> Left err
    ExitSuccess   -> Right (err, out)

-- | Generically show something.
readAllFromProcess program flags input = do
  (code,out,err) <- readProcessWithExitCode program flags input
  return $ case code of
    ExitFailure _ -> Left err
    ExitSuccess   -> Right (err, out)

-- | Generically show something.