Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A command which calls a compiler
Synopsis
- callCompiler :: Bool -> FilePath -> [String] -> Maybe FilePath -> Maybe TextEncoding -> TCM ()
- callCompiler' :: FilePath -> [String] -> Maybe FilePath -> Maybe TextEncoding -> TCM (Maybe String)
Documentation
:: Bool | Should we actually call the compiler |
-> FilePath | The path to the compiler |
-> [String] | Command-line arguments. |
-> Maybe FilePath | The working directory that should be used when the compiler is invoked. The default is the current working directory. |
-> Maybe TextEncoding | Use the given text encoding, if any, when reading the output from the process (stdout and stderr). |
-> TCM () |
Calls a compiler:
- Checks the exit code to see if the compiler exits successfully. If not, then an exception is raised, containing the text the compiler printed to stderr (if any).
- Uses the debug printout machinery to relay any progress information the compiler prints to stdout.
:: FilePath | The path to the compiler |
-> [String] | Command-line arguments. |
-> Maybe FilePath | The working directory that should be used when the compiler is invoked. The default is the current working directory. |
-> Maybe TextEncoding | Use the given text encoding, if any, when reading the output from the process (stdout and stderr). |
-> TCM (Maybe String) |
Generalisation of callCompiler
where the raised exception is
returned.