packages feed

hackage-db 1.9 → 1.9.1

raw patch · 2 files changed

+26/−1 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

hackage-db.cabal view
@@ -1,5 +1,5 @@ Name:                   hackage-db-Version:                1.9+Version:                1.9.1 Copyright:              Peter Simons License:                BSD3 License-File:           LICENSE@@ -53,4 +53,5 @@   hs-source-dirs:       src   Exposed-Modules:      Distribution.Hackage.DB.Unparsed                         Distribution.Hackage.DB.Parsed+                        Distribution.Hackage.DB.Path                         Distribution.Hackage.DB
+ src/Distribution/Hackage/DB/Path.hs view
@@ -0,0 +1,24 @@+{- |+   Module      :  Distribution.Hackage.DB.Path+   License     :  BSD3+   Maintainer  :  simons@cryp.to+   Stability   :  provisional+   Portability :  portable++   Find the location of the local Hackage database that is maintained by running+   @cabal update@.+ -}++module Distribution.Hackage.DB.Path ( hackagePath ) where++import System.Directory ( getHomeDirectory )+import System.FilePath ( joinPath )++-- | Determine the default path of the Hackage database, which typically+-- resides at @"$HOME\/.cabal\/packages\/hackage.haskell.org\/00-index.tar"@.+-- Running the command @"cabal update"@ will keep that file up-to-date.++hackagePath :: IO FilePath+hackagePath = do+  homedir <- getHomeDirectory+  return $ joinPath [homedir, ".cabal", "packages", "hackage.haskell.org", "00-index.tar"]