pack package:ghc-boot

O(n) Convert a String into a ShortText.
Represents a lock of a package db.
O(n) Convert a ShortText into a String.
Acquire an exclusive lock related to package DB under given location.
Read the part of the package DB that GHC is interested in.
Read the part of the package DB that ghc-pkg is interested in Note that the Binary instance for ghc-pkg's representation of packages is not defined in this package. This is because ghc-pkg uses Cabal types (and Binary instances for these) which this package does not depend on. If we open the package db in read only mode, we get its contents. Otherwise we additionally receive a PackageDbLock that represents a lock on the database, so that we can safely update it later.
Source package identifier. Cabal instantiates this with Distribution.Types.PackageId.PackageId type which only contains the source package name and version. Notice that it doesn't contain the Hackage revision, nor any kind of hash.
Source package name
Source package version
Release the lock related to package DB.
Write the whole of the package DB, both parts.