Represents a program which can be configured.
Note: rather than constructing this directly, start with simpleProgram and
override any extra fields.
Constructors
ProgramprogramName :: StringThe simple name of the program, eg. ghc
programFindLocation :: Verbosity -> ProgramSearchPath -> IO (Maybe (FilePath, [FilePath]))A function to search for the program if its location was not specified by the user. Usually this will just be a call to
findProgramOnSearchPath.It is supplied with the prevailing search path which will typically just be used as-is, but can be extended or ignored as needed.
For the purpose of change monitoring, in addition to the location where the program was found, it returns all the other places that were tried.
programFindVersion :: Verbosity -> FilePath -> IO (Maybe Version)Try to find the version of the program. For many programs this is not possible or is not necessary so it's OK to return Nothing.
programPostConf :: Verbosity -> ConfiguredProgram -> IO ConfiguredProgramA function to do any additional configuration after we have located the program (and perhaps identified its version). For example it could add args, or environment vars.
programNormaliseArgs :: Maybe Version -> PackageDescription -> [String] -> [String]A function that filters any arguments that don't impact the output from a commandline. Used to limit the volatility of dependency hashes when using new-build.