Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command_outside :: String -> [String] -> IO (String, ExitCode)
- command_outside name args = do
- (input, output, err, handle) <- (runInteractiveProcess name args Nothing Nothing)
- exit_code <- waitForProcess handle
- out_ <- (System.IO.Streams.Internal.read output)
- case out_ of
- Nothing -> return ("", exit_code)
- Just value -> do
- let out = (fromByteString value)
- case out of
- Nothing -> return ("", exit_code)
- Just a -> return (a, exit_code)
- command_exit :: IO ()
- command_exit = exitWith ExitSuccess
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement