License | BSD3 |
---|---|
Maintainer | simons@cryp.to |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
This module provides simple access to the Hackage database by means
of Map
.
- type Hackage = Map String (Map Version GenericPackageDescription)
- readHackage :: IO Hackage
- readHackage' :: FilePath -> IO Hackage
- parseHackage :: ByteString -> Hackage
- parseUnparsedHackage :: Hackage -> Hackage
- parsePackage :: String -> Version -> ByteString -> GenericPackageDescription
- parsePackage' :: ByteString -> Either String GenericPackageDescription
Documentation
type Hackage = Map String (Map Version GenericPackageDescription) Source
A Map
representation of the Hackage database. Every package name
maps to a non-empty set of version, and for every version there is a
parsed Cabal file.
readHackage :: IO Hackage Source
Read the Hackage database from the location determined by hackagePath
and return a Map
that provides fast access to its contents.
readHackage' :: FilePath -> IO Hackage Source
parseHackage :: ByteString -> Hackage Source
Parse the contents of Hackage's 00-index.tar
into a Hackage
map.
parsePackage :: String -> Version -> ByteString -> GenericPackageDescription Source
Convenience wrapper around parsePackage'
to parse a single Cabal
file. Failure is reported with error
.
parsePackage' :: ByteString -> Either String GenericPackageDescription Source
Parse a single Cabal file.