diff --git a/example/show-package-versions.hs b/example/show-package-versions.hs
--- a/example/show-package-versions.hs
+++ b/example/show-package-versions.hs
@@ -1,9 +1,3 @@
-{-# LANGUAGE CPP #-}
-
-#if !MIN_VERSION_Cabal(2,0,0)
-#  define mkPackageName PackageName
-#endif
-
 module Main ( main ) where
 
 import Distribution.Hackage.DB
diff --git a/hackage-db.cabal b/hackage-db.cabal
--- a/hackage-db.cabal
+++ b/hackage-db.cabal
@@ -1,12 +1,7 @@
--- This file has been generated from package.yaml by hpack version 0.18.1.
---
--- see: https://github.com/sol/hpack
-
 name:                   hackage-db
-version:                2.0
+version:                2.0.1
 license:                BSD3
 license-file:           LICENSE
-tested-with:            GHC > 7.8 && < 8.3
 author:                 Peter Simons, Alexander Altman, Ben James
 maintainer:             Peter Simons <simons@cryp.to>
 homepage:               https://github.com/peti/hackage-db#readme
@@ -15,21 +10,34 @@
 synopsis:               Access Hackage's package database via Data.Map
 cabal-version:          >= 1.10
 build-type:             Simple
-description:            This is an early and mostly undocumented release of the 2.x version of hackage-db that's intended mostly for experimenting with and testing of the new API. Porting code from 1.x to 2.x is pretty simple, but if you do that at this point, please expect minor details of this API to change in forthcoming releases. For production code, you are probably better off with the 1.x release for now.
-                        .
-                        Check out https://github.com/peti/hackage-db/tree/master/example/ for a collection of simple example programs that demonstrate how to use this code.
+tested-with:            GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3
+                      , GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1
 
+description:
+  This is an early and mostly undocumented release of the 2.x version of
+  hackage-db that's intended mostly for experimenting with and testing of the
+  new API. Porting code from 1.x to 2.x is pretty simple, but if you do that at
+  this point, please expect minor details of this API to change in forthcoming
+  releases.
+  .
+  Check out https://github.com/peti/hackage-db/tree/master/example/ for a
+  collection of simple example programs that demonstrate how to use this code.
+
 source-repository head
   type: git
-  location: https://github.com/peti/hackage-db
+  location: git://github.com/peti/hackage-db.git
 
+flag install-examples
+  description:   Build and install example programs.
+  default:       False
+
 library
   hs-source-dirs:
       src
   other-extensions: DeriveDataTypeable DeriveGeneric
   build-depends:
       base >= 3 && < 5
-    , Cabal
+    , Cabal >2.2
     , containers
     , aeson
     , bytestring
@@ -51,28 +59,34 @@
   default-language: Haskell2010
 
 executable list-known-versions
-  main-is: list-known-versions.hs
-  hs-source-dirs:
-      example
-  build-depends:
-      base >= 3 && < 5
-    , Cabal
-    , containers
-    , hackage-db
-    , bytestring
+  main-is:              list-known-versions.hs
+  hs-source-dirs:       example
+  if flag(install-examples)
+    buildable:          True
+    build-depends:
+        base >= 3 && < 5
+      , Cabal
+      , containers
+      , hackage-db
+      , bytestring
+  else
+    buildable:          False
   default-language: Haskell2010
 
 executable show-meta-data
   main-is: show-meta-data.hs
   hs-source-dirs:
       example
-  build-depends:
-      base >= 3 && < 5
-    , Cabal
-    , containers
-    , hackage-db
-    , bytestring
-    , utf8-string
+  if flag(install-examples)
+    buildable:          True
+    build-depends:
+        base >= 3 && < 5
+      , Cabal
+      , containers
+      , hackage-db
+      , utf8-string
+  else
+    buildable:          False
   default-language: Haskell2010
 
 executable show-package-versions
@@ -80,9 +94,13 @@
   hs-source-dirs:
       example
   other-extensions: CPP
-  build-depends:
-      base >= 3 && < 5
-    , Cabal
-    , containers
-    , hackage-db
+  if flag(install-examples)
+    buildable:          True
+    build-depends:
+        base >= 3 && < 5
+      , Cabal
+      , containers
+      , hackage-db
+  else
+    buildable:          False
   default-language: Haskell2010
diff --git a/src/Distribution/Hackage/DB/Parsed.hs b/src/Distribution/Hackage/DB/Parsed.hs
--- a/src/Distribution/Hackage/DB/Parsed.hs
+++ b/src/Distribution/Hackage/DB/Parsed.hs
@@ -13,17 +13,18 @@
 import qualified Distribution.Hackage.DB.Unparsed as U
 import Distribution.Hackage.DB.Utility
 
-import GHC.Generics ( Generic )
 import Control.Exception
 import Data.ByteString.Lazy as BS
 import Data.ByteString.Lazy.UTF8 as BS
 import Data.Map as Map
+import Data.Maybe
 import Data.Time.Clock
 import Distribution.Package
 import Distribution.PackageDescription
-import Distribution.PackageDescription.Parse
+import Distribution.PackageDescription.Parsec
 import Distribution.Text
 import Distribution.Version
+import GHC.Generics ( Generic )
 
 type HackageDB = Map PackageName PackageData
 
@@ -57,9 +58,8 @@
    mapException (\e -> HackageDBPackageVersion v (e :: SomeException)) $
      VersionData gpd (parseMetaData pn v m)
   where
-    gpd = case parsePackageDescription (toString cf) of
-            ParseOk _ a     -> a
-            ParseFailed msg -> throw (InvalidCabalFile (show msg))
+    gpd = fromMaybe (throw (InvalidCabalFile (show (pn,v)))) $
+            parseGenericPackageDescriptionMaybe (toStrict cf)
 
 parseMetaData :: PackageName -> Version -> ByteString -> Map String String
 parseMetaData pn v buf | BS.null buf = Map.empty
diff --git a/src/Distribution/Hackage/DB/Utility.hs b/src/Distribution/Hackage/DB/Utility.hs
--- a/src/Distribution/Hackage/DB/Utility.hs
+++ b/src/Distribution/Hackage/DB/Utility.hs
@@ -20,8 +20,6 @@
 
 -- | Convert the the 'EpochTime' used by the @tar@ library into a standard
 -- 'UTCTime' type.
---
--- prop> \et -> toEpochTime (fromEpochTime et) == et
 
 fromEpochTime :: EpochTime -> UTCTime
 fromEpochTime et = posixSecondsToUTCTime (realToFrac et)
