Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getCabal :: PackageIdentifier -> IO ByteString
- getCabals :: PackageIdentifier -> PackageIdentifier -> IO (ByteString, ByteString)
- withCabalFile :: PackageIdentifier -> (FilePath -> IO a) -> IO a
- listPackages :: IO [String]
- packageVersions :: PackageName -> IO [Version]
- latestVersion :: PackageName -> IO (Maybe Version)
- preferredVersions :: PackageName -> IO (Maybe ByteString)
- getTimestamp :: PackageIdentifier -> IO (Maybe UTCTime)
- indexFiles :: IO [String]
- getPackageDescription :: PackageIdentifier -> IO (Maybe PackageDescription)
- getPackageDescription' :: PackageIdentifier -> IO PackageDescription
- packageIdOrLatest :: PackageIdentifier -> IO PackageIdentifier
- getFileInfo :: PackageIdentifier -> IO FileInfo
- data FileInfo = FileInfo {
- fileInfoLength :: FileLength
- fileInfoHashes :: Map HashFn Hash
- newtype FileLength = FileLength {
- fileLength :: Int54
- fileInfoSHA256 :: FileInfo -> Maybe Hash
Documentation
getCabal :: PackageIdentifier -> IO ByteString Source #
Get the contents of the .cabal file for package version
getCabals :: PackageIdentifier -> PackageIdentifier -> IO (ByteString, ByteString) Source #
Get two .cabal files at once!
withCabalFile :: PackageIdentifier -> (FilePath -> IO a) -> IO a Source #
Pass a temporary copy of .cabal file to some action
listPackages :: IO [String] Source #
List all packages in the index (unsorted for performance)
packageVersions :: PackageName -> IO [Version] Source #
Get all versions of a package in the index
latestVersion :: PackageName -> IO (Maybe Version) Source #
Get the latest version of package from the index
Note: does not take preferred-versions into account
preferredVersions :: PackageName -> IO (Maybe ByteString) Source #
Get the preferred-versions metadata for package
getTimestamp :: PackageIdentifier -> IO (Maybe UTCTime) Source #
Get the index timestamp for (the latest revision of) pkgid
indexFiles :: IO [String] Source #
List all files in the Hackage index (.cabal files, metadata .json files, preferred-versions files)
getPackageDescription :: PackageIdentifier -> IO (Maybe PackageDescription) Source #
Get and try to parse the PackageDescription of a package version
getPackageDescription' :: PackageIdentifier -> IO PackageDescription Source #
Get and parse PackageDescription of package version
Raises an error on failure.
packageIdOrLatest :: PackageIdentifier -> IO PackageIdentifier Source #
Convert a PackageID if unversioned to latest package version
getFileInfo :: PackageIdentifier -> IO FileInfo Source #
Get FileInfo metadata for package version source
Re-exports from hackage-security
FileInfo | |
|
Instances
Show FileInfo | |
ReportSchemaErrors m => FromJSON m FileInfo | |
Defined in Hackage.Security.TUF.FileInfo | |
Monad m => ToJSON m FileInfo | |
Defined in Hackage.Security.TUF.FileInfo |
newtype FileLength #
FileLength | |
|
Instances
Eq FileLength | |
Defined in Hackage.Security.TUF.Common (==) :: FileLength -> FileLength -> Bool (/=) :: FileLength -> FileLength -> Bool | |
Ord FileLength | |
Defined in Hackage.Security.TUF.Common compare :: FileLength -> FileLength -> Ordering (<) :: FileLength -> FileLength -> Bool (<=) :: FileLength -> FileLength -> Bool (>) :: FileLength -> FileLength -> Bool (>=) :: FileLength -> FileLength -> Bool max :: FileLength -> FileLength -> FileLength min :: FileLength -> FileLength -> FileLength | |
Show FileLength | |
Defined in Hackage.Security.TUF.Common showsPrec :: Int -> FileLength -> ShowS show :: FileLength -> String showList :: [FileLength] -> ShowS | |
ReportSchemaErrors m => FromJSON m FileLength | |
Defined in Hackage.Security.TUF.Common fromJSON :: JSValue -> m FileLength | |
Monad m => ToJSON m FileLength | |
Defined in Hackage.Security.TUF.Common toJSON :: FileLength -> m JSValue |
fileInfoSHA256 :: FileInfo -> Maybe Hash #