-- | Get all the packages from the index.
--
-- They are grouped by package name (case-sensitively).
--
allPackagesByName :: PackageIndex a -> [(PackageName, [a])]
allPackagesByName index =
  [ (pkgname, concat (Map.elems pvers))
  | (pkgname, pvers) <- Map.toList (packageIdIndex index) ]
allPackagesByName :: PackageIndex a -> [(PackageName, [a])]
allPackagesByName index =
  [ (pkgname, concat (Map.elems pvers))
  | (pkgname, pvers) <- Map.toList (packageIdIndex index) ]
allPackagesByName index =
  [ (pkgname, concat (Map.elems pvers))
  | (pkgname, pvers) <- Map.toList (packageIdIndex index) ]