register :: PackageDescription-> LocalBuildInfo-> RegisterFlagsInstall in the user's database?; verbose
-> IO ()
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
ModuleCabal-3.12.1.0Haskell2010
This module deals with registering and unregistering packages. There are a
couple ways it can do this, one is to do it directly. Another is to generate
a script that can be run later to do it. The idea here being that the user
is shielded from the details of what command to use for package registration
for a particular compiler. In practice this aspect was not especially
popular so we also provide a way to simply generate the package registration
file which then must be manually passed to ghc-pkg. It is possible to
generate registration information for where the package is to be installed,
or alternatively to register the package in place in the build tree. The
latter is occasionally handy, and will become more important when we try to
build multi-package systems.
This module does not delegate anything to the per-compiler modules but just mixes it all in this module, which is rather unsatisfactory. The script generation and the unregister feature are not well used or tested.
register :: PackageDescription-> LocalBuildInfo-> RegisterFlagsInstall in the user's database?; verbose
-> IO ()Create an empty package DB at the specified location.
Compute the AbiHash of a library that we built inplace.
Run hc-pkg using a given package DB stack, directly forwarding the
provided command-line arguments to it.
Additional variations in the behaviour for register.
RegisterOptionsregisterAllowOverwrite :: BoolAllows re-registering / overwriting an existing package
registerMultiInstance :: BoolInsist on the ability to register multiple instances of a
single version of a single package. This will fail if the hc-pkg
does not support it, see nativeMultiInstance and
recacheMultiInstance.
registerSuppressFilesCheck :: BoolRequire that no checks are performed on the existence of package
files mentioned in the registration info. This must be used if
registering prior to putting the files in their final place. This will
fail if the hc-pkg does not support it, see suppressFilesCheck.
Defaults are True, False and False
inplaceInstalledPackageInfo :: FilePathtop of the build tree
-> FilePathlocation of the dist tree
-> PackageDescription-> AbiHash-> Library-> LocalBuildInfo-> ComponentLocalBuildInfo-> InstalledPackageInfoConstruct InstalledPackageInfo for a library that is in place in the build tree.
This function knows about the layout of in place packages.
Construct InstalledPackageInfo for the final install location of a library package.
This function knows about the layout of installed packages.
generalInstalledPackageInfo :: ([FilePath] -> [FilePath])Translate relative include dir paths to absolute paths.
-> PackageDescription-> AbiHash-> Library-> LocalBuildInfo-> ComponentLocalBuildInfo-> InstallDirs FilePath-> InstalledPackageInfoConstruct InstalledPackageInfo for a library in a package, given a set of installation directories.