packageDbPaths :: FilePath -> FilePath -> PackageDB -> [FilePath]
packageDbPaths home hugslibdir db = case db of
  GlobalPackageDB        -> [ hugslibdir </> "packages"
                            , "/usr/local/lib/hugs/packages" ]
  UserPackageDB          -> [ home </> "lib/hugs/packages" ]
  SpecificPackageDB path -> [ path ]
packageDbPaths :: FilePath -> FilePath -> PackageDB -> [FilePath]
packageDbPaths home hugslibdir db = case db of
  GlobalPackageDB        -> [ hugslibdir </> "packages"
                            , "/usr/local/lib/hugs/packages" ]
  UserPackageDB          -> [ home </> "lib/hugs/packages" ]
  SpecificPackageDB path -> [ path ]
packageDbPaths home hugslibdir db = case db of
  GlobalPackageDB        -> [ hugslibdir </> "packages"
                            , "/usr/local/lib/hugs/packages" ]
  UserPackageDB          -> [ home </> "lib/hugs/packages" ]
  SpecificPackageDB path -> [ path ]