Constructors
NotInLibrary :: SetupRunnerArgs 'UseGeneralSetupInLibraryArgs :: InLibraryArgs flags -> SetupRunnerArgs ('TryInLibrary flags)
:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11
Modulecabal-install-3.18.1.0Haskell2010
An interface to building and installing Cabal packages.
If the Built-Type field is specified as something other than
Custom, and the current version of Cabal is acceptable, this performs
setup actions directly. Otherwise it builds the setup script and
runs it with the given arguments.
NotInLibrary :: SetupRunnerArgs 'UseGeneralSetupInLibraryArgs :: InLibraryArgs flags -> SetupRunnerArgs ('TryInLibrary flags)SBuildPhase :: SPostConfigurePhase BuildFlagsSHaddockPhase :: SPostConfigurePhase HaddockFlagsSReplPhase :: SPostConfigurePhase ReplFlagsSCopyPhase :: SPostConfigurePhase CopyFlagsSRegisterPhase :: SPostConfigurePhase RegisterFlagsSTestPhase :: SPostConfigurePhase TestFlagsSBenchPhase :: SPostConfigurePhase BenchmarkFlagsSetupRunnerRes 'UseGeneralSetup = ()SetupRunnerRes ('TryInLibrary phase) = InLibraryPhaseRes phaseIf we end up using the in-library method, we use the InLibraryLBI constructor. If not, we use the NotInLibraryNoLBI constructor.
NB: we don't know ahead of time whether we can use the in-library method; e.g. for a package with Hooks build-type, it depends on whether the Cabal version used by the package matches with the Cabal version that cabal-install was built against.
RightFlagsForPhase flags 'UseGeneralSetup = ()RightFlagsForPhase flags ('TryInLibrary flags') = flags ~ flags'setupWrapper :: RightFlagsForPhase flags setupSpec=> Verbosity-> SetupScriptOptions-> Maybe PackageDescription-> CommandUI flags-> (flags -> CommonSetupFlags)-> (Version -> IO flags)produce command flags given the Cabal library version
-> (Version -> [String])-> SetupRunnerArgs setupSpec-> IO (SetupRunnerRes setupSpec)Configure a Setup and run a command in one step. The command flags
may depend on the Cabal library version in use.
SetupScriptOptions are options used to configure and run Setup, as
opposed to options given to the Cabal command at runtime.
SetupScriptOptionsuseCabalVersion :: VersionRangeThe version of the Cabal library to use (if useDependenciesExclusive is not set). A suitable version of the Cabal library must be installed (or for some build-types be the one cabal-install was built with).
The version found also determines the version of the Cabal specification that we us for talking to the Setup.hs, unless overridden by useCabalSpecVersion.
useCabalSpecVersion :: Maybe VersionThis is the version of the Cabal specification that we believe that this package uses. This affects the semantics and in particular the Setup command line interface.
This is similar to useCabalVersion but instead of probing the system for a version of the Cabal library you just say exactly which version of the spec we will use. Using this also avoids adding the Cabal library as an additional dependency, so add it to useDependencies if needed.
useCompiler :: Maybe CompilerusePlatform :: Maybe PlatformusePackageDB :: PackageDBStackCWDusePackageIndex :: Maybe InstalledPackageIndexuseProgramDb :: ProgramDbuseDistPref :: SymbolicPath Pkg ('Dir Dist)useLoggingHandle :: Maybe HandleuseWorkingDir :: Maybe (SymbolicPath CWD ('Dir Pkg))useExtraPathEnv :: [FilePath]Extra things to add to PATH when invoking the setup script.
useExtraEnvOverrides :: [(String, Maybe FilePath)]useDependencies :: [(ComponentId, PackageId)]List of dependencies to use when building Setup.hs.
useDependenciesExclusive :: BoolIs the list of setup dependencies exclusive?
When this is False, if we compile the Setup.hs script we do so with the
list in useDependencies but all other packages in the environment are
also visible. A suitable version of Cabal library (see
useCabalVersion) is also added to the list of dependencies, unless
useDependencies already contains a Cabal dependency.
When True, only the useDependencies packages are used, with other
packages in the environment hidden.
This feature is here to support the setup stanza in .cabal files that specifies explicit (and exclusive) dependencies, as well as the old style with no dependencies.
useVersionMacros :: BoolShould we build the Setup.hs with CPP version macros available? We turn this on when we have a setup stanza in .cabal that declares explicit setup dependencies.
useWin32CleanHack :: BoolsetupCacheLock :: Maybe LockisInteractive :: BoolIs the task we are going to run an interactive foreground task, or an non-interactive background task? Based on this flag we decide whether or not to delegate ctrl+c to the spawned task
isMainLibOrExeComponent :: BoolLet the setup script logic know if it is being run to build a main library or executable component. This is used to determine if we should use the configure command, if the build-type is Configure. For configure, only the main library and execomponents have configure support, and thus we can skip running configure for other components.