Portability | portable |
---|---|
Stability | provisional |
Maintainer | [email protected] |
Safe Haskell | Safe-Infered |
Distribution.Hackage.DB
Description
This module provides simple access to the Hackage database by means
of Map
. Note that once the database has been parsed, it can be
accessed quickly, but the inital cost of reading 00-index.tar
is
fairly high.
- type Hackage = Map String (Map Version GenericPackageDescription)
- readHackage :: IO Hackage
- readHackage' :: FilePath -> IO Hackage
- parseHackage :: ByteString -> Hackage
- module Data.Map
- module Data.Version
- module Distribution.Package
- module Distribution.PackageDescription
Documentation
type Hackage = Map String (Map Version GenericPackageDescription)Source
A Map
representation of the Hackage database. For sake of
simplicity, we use String
rather than PackageName
to represent
the name of a package.
readHackage :: IO HackageSource
Read the Hackage database from
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar
and
return a Map
that provides fast access to its contents. That tar
file is typically created by running the command "cabal update"
.
readHackage' :: FilePath -> IO HackageSource
parseHackage :: ByteString -> HackageSource
Parse the contents of Hackage's 00-index.tar
into a Hackage
map.
module Data.Map
module Data.Version
module Distribution.Package