packages feed

hackage-db 2.1.1 → 2.1.2

raw patch · 4 files changed

+24/−7 lines, 4 filesnew-uploaderPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

+ CHANGELOG.md view
@@ -0,0 +1,6 @@+# Revision history for hackage-db++## 2.1.2++Fix a bug which lead to `parsePackageData` always failing if the package had+a `preferred-versions` file in the hackage tarball.
+ README.md view
@@ -0,0 +1,7 @@+hackage-db+==========++[![hackage release](https://img.shields.io/hackage/v/hackage-db.svg?label=hackage)](http://hackage.haskell.org/package/hackage-db)+[![stackage LTS package](http://stackage.org/package/hackage-db/badge/lts)](http://stackage.org/lts/package/hackage-db)+[![stackage Nightly package](http://stackage.org/package/hackage-db/badge/nightly)](http://stackage.org/nightly/package/hackage-db)+![Continous Integration](https://github.com/NixOS/hackage-db/workflows/Haskell-CI/badge.svg)
hackage-db.cabal view
@@ -1,9 +1,9 @@ name:          hackage-db-version:       2.1.1+version:       2.1.2 synopsis:      Access cabal-install's Hackage database via Data.Map description:   This library provides convenient access to the local copy of the Hackage                database that \"cabal update\" creates. Check out-               <https://github.com/peti/hackage-db/tree/master/example/> for a collection+               <https://github.com/NixOS/hackage-db/tree/master/example/> for a collection                of simple example programs that demonstrate how to use this code. license:       BSD3 license-file:  LICENSE@@ -11,14 +11,16 @@ maintainer:    Peter Simons <simons@cryp.to> tested-with:   GHC == 8.8.4 || == 8.10.4 || == 9.0.1 category:      Distribution-homepage:      https://github.com/peti/hackage-db#readme-bug-reports:   https://github.com/peti/hackage-db/issues+homepage:      https://github.com/NixOS/hackage-db#readme+bug-reports:   https://github.com/NixOS/hackage-db/issues build-type:    Simple cabal-version: >= 1.10+extra-source-files: README.md+                    CHANGELOG.md  source-repository head   type:     git-  location: git://github.com/peti/hackage-db.git+  location: git://github.com/NixOS/hackage-db.git  flag install-examples   default:     False
src/Distribution/Hackage/DB/Parsed.hs view
@@ -27,6 +27,7 @@ import Distribution.PackageDescription import Distribution.PackageDescription.Parsec import Distribution.Text+import Distribution.Types.PackageVersionConstraint import Distribution.Version import GHC.Generics ( Generic ) @@ -54,8 +55,9 @@     Map.mapWithKey (parseVersionData pn) $       Map.filterWithKey (\v _ -> v `withinRange` vr) vs'   where-    vr | BSS.null pv = anyVersion-       | otherwise = parseText "preferred version range" (toString pv)+    PackageVersionConstraint _ vr+      | BSS.null pv = PackageVersionConstraint pn anyVersion+      | otherwise = parseText "preferred version range" (toString pv)  parseVersionData :: PackageName -> Version -> U.VersionData -> VersionData parseVersionData pn v (U.VersionData cf m) =