Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PackageDownload = PackageDownload {
- pdSHA256 :: !StaticSHA256
- pdUrl :: !ByteString
- pdSize :: !Word64
- newtype HSPackageDownload = HSPackageDownload {}
- newtype PackageCache index = PackageCache (HashMap PackageName (HashMap Version (index, Maybe PackageDownload, NonEmpty ([CabalHash], OffsetSize))))
- data OffsetSize = OffsetSize !Int64 !Int64
- data PackageIndex = PackageIndex {
- indexName :: !IndexName
- indexLocation :: !Text
- indexType :: !IndexType
- indexDownloadPrefix :: !Text
- indexRequireHashes :: !Bool
- newtype IndexName = IndexName {}
- indexNameText :: IndexName -> Text
- data IndexType
- data HackageSecurity = HackageSecurity {
- hsKeyIds :: ![Text]
- hsKeyThreshold :: !Int
Documentation
data PackageDownload Source #
PackageDownload | |
|
newtype HSPackageDownload Source #
Hackage Security provides a different JSON format, we'll have our own JSON parser for it.
newtype PackageCache index Source #
Cached information about packages in an index. We have a mapping from package name to a version map. Within the version map, we map from the version to information on an individual version. Each version has optional download information (about the package's tarball itself), and cabal file information. The cabal file information is a non-empty list of all cabal file revisions. Each file revision indicates the hash of the contents of the cabal file, and the offset into the index tarball.
It's assumed that cabal files appear in the index tarball in the correct revision order.
PackageCache (HashMap PackageName (HashMap Version (index, Maybe PackageDownload, NonEmpty ([CabalHash], OffsetSize)))) |
Eq index => Eq (PackageCache index) Source # | |
Data index => Data (PackageCache index) Source # | |
Show index => Show (PackageCache index) Source # | |
Generic (PackageCache index) Source # | |
Monoid (PackageCache index) Source # | |
NFData index => NFData (PackageCache index) Source # | |
Store index => Store (PackageCache index) Source # | |
type Rep (PackageCache index) Source # | |
data OffsetSize Source #
offset in bytes into the 01-index.tar file for the .cabal file contents, and size in bytes of the .cabal file
PackageIndex, IndexName & IndexLocation
data PackageIndex Source #
Information on a single package index
PackageIndex | |
|
Unique name for a package index
indexNameText :: IndexName -> Text Source #