Package maintainers and Hackage trustees are allowed to edit certain bits
of package metadata after a release, without uploading a new tarball.
Note that the tarball itself is never changed, just the metadata that is
stored separately. For more information about metadata revisions, please
refer to the
Hackage Metadata Revisions FAQ.
No. |
Time |
User |
SHA256 |
-r2 (hackage-db-1.22-r2) |
2019-09-22T19:34:35Z |
PeterSimons |
595751158b91058c409cba1d5f854f0cbe8d79ddebfe948d7c5775032858d4aa
|
|
|
-r1 (hackage-db-1.22-r1) |
2015-01-16T20:50:27Z |
PeterSimons |
b5277a8cbbfcfba81f29db4910003c2fa7e34c06bceb4f3e7318510e1ce74376
|
|
Changed description
from This module provides simple access to the Hackage database by means
of @Data.Map@. Suppose you wanted to implement a utility that queries
the set of available versions for a given package, the following
program would do the trick:
> import qualified Distribution.Hackage.DB as DB
> import Distribution.Text ( display )
> import System.Environment ( getArgs )
>
> main :: IO ()
> main = do
> pkgs <- getArgs
> db <- DB.readHackage
> let getVersions name = maybe [] DB.keys (DB.lookup name db)
> mapM_ (putStrLn . unwords . map display . getVersions) pkgs
When run, it would produce the following output:
> ./a.out containers deepseq cabal-install
> 0.1.0.0 0.1.0.1 0.2.0.0 0.2.0.1 0.3.0.0 0.4.0.0
> 1.0.0.0 1.1.0.0 1.1.0.1 1.1.0.2
> 0.4.0 0.5.0 0.5.1 0.5.2 0.6.0 0.6.2 0.6.4 0.8.0 0.8.2 0.10.0 0.10.2
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.
This package is known to work on Linux and Mac OS X, but it's
probably not going to work on Windows (because no-one tested it, as
far as I know).
to This module provides simple access to the Hackage database by means
of @Data.Map@. Suppose you wanted to implement a utility that queries
the set of available versions for a given package, the following
program would do the trick:
> import qualified Distribution.Hackage.DB as DB
> import Distribution.Text ( display )
> import System.Environment ( getArgs )
>
> main :: IO ()
> main = do
> pkgs <- getArgs
> db <- DB.readHackage
> let getVersions name = maybe [] DB.keys (DB.lookup name db)
> mapM_ (putStrLn . unwords . map display . getVersions) pkgs
When run, it would produce the following output:
> ./a.out containers deepseq cabal-install
> 0.1.0.0 0.1.0.1 0.2.0.0 0.2.0.1 0.3.0.0 0.4.0.0
> 1.0.0.0 1.1.0.0 1.1.0.1 1.1.0.2
> 0.4.0 0.5.0 0.5.1 0.5.2 0.6.0 0.6.2 0.6.4 0.8.0 0.8.2 0.10.0 0.10.2
|
-r0 (hackage-db-1.22-r0) |
2015-01-15T20:31:34Z |
PeterSimons |
aa25b7a04ec8e1cc613e69387924c8ef8a486fe606555f870d713a9fb2264852
|
|
|