hackage-db 1.6 → 1.7
raw patch · 2 files changed
+15/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hackage-db.cabal +6/−2
- src/Distribution/Hackage/DB.hs +9/−2
hackage-db.cabal view
@@ -1,5 +1,5 @@ Name: hackage-db-Version: 1.6+Version: 1.7 Copyright: Peter Simons License: BSD3 License-File: LICENSE@@ -10,7 +10,7 @@ Synopsis: provide access to the Hackage database via Data.Map Cabal-Version: >= 1.6 Build-Type: Simple-Tested-With: GHC >= 6.12.3 && <= 7.6.2+Tested-With: GHC >= 6.12.3 && <= 7.6.3 Description: This module provides simple access to the Hackage database by means of @Data.Map@. Suppose you wanted to implement a utility that queries@@ -38,6 +38,8 @@ 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 not Windows. Source-Repository head Type: git@@ -49,3 +51,5 @@ hs-source-dirs: src Ghc-Options: -Wall Exposed-Modules: Distribution.Hackage.DB+ if os(darwin)+ Cpp-Options: -DIS_DARWIN
src/Distribution/Hackage/DB.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {- | Module : Distribution.Hackage.DB License : BSD3@@ -43,14 +44,20 @@ type Hackage = Map String (Map Version GenericPackageDescription) -- | Read the Hackage database from--- @$HOME\/.cabal\/packages\/hackage.haskell.org\/00-index.tar@ and+-- @$HOME\/@/<package database path>/@\/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 :: IO Hackage readHackage = do homedir <- getHomeDirectory- readHackage' (joinPath [ homedir, ".cabal", "packages", "hackage.haskell.org", "00-index.tar" ])+ readHackage' (joinPath [ homedir,+#ifdef IS_DARWIN+ "Library", "Haskell", "repo-cache"+#else+ ".cabal", "packages"+#endif+ , "hackage.haskell.org", "00-index.tar" ]) -- | Read the Hackage database from the given 'FilePath' and return a -- 'Hackage' map that provides fast access to its contents.