Moduleghc-toolchain-0.1.0.0Haskell2010
GHC.Toolchain.Program
Synopsis
- data Program
- value shProgram
- value _prgPath
- value _prgFlags
- value addFlagIfNew
- value runProgram
- value callProgram
- value readProgram
- value readProgramStdout
- data ProgOpt
- value emptyProgOpt
- value programFromOpt
- value _poPath
- value _poFlags
- value findProgram
- value compile
- value supportsTarget
- Packageghc-toolchain-0.1.0.0
- Exports17
- LanguageHaskell2010
- LicenceNONE
- SourceProgram.hs
Prepends a flag to a program's flags if the flag is not in the existing flags.
Running programs
Runs a program with a list of arguments and returns the exit code and the stdout and stderr output
Runs a program with a list of arguments and returns the stdout output, ignoring the exit code.
Finding Programs
programFromOpt findProgram Tries to find the user specified program by path or tries to look for one in the given list of candidates.
If the ProgOpt program flags are unspecified the program will have an empty list of flags.
Compiler programs
compile Compile a program with a given compiler.
The compiler must
* Take the program path as a positional argument
* Accept -o to specify output path
supportsTarget Does compiler program support the --target=triple option? If so, we should
pass it whenever possible to avoid ambiguity and potential compile-time
errors (e.g. see #20162).