-- | Compute the dependency closure of a package in a install plan
--
dependencyClosure :: GenericInstallPlan ipkg srcpkg iresult ifailure
                  -> [UnitId]
                  -> [GenericPlanPackage ipkg srcpkg iresult ifailure]
dependencyClosure plan =
    map (planPkgOf plan)
  . concatMap Tree.flatten
  . Graph.dfs (planGraph plan)
  . map (planVertexOf plan)
dependencyClosure :: GenericInstallPlan ipkg srcpkg iresult ifailure
                  -> [UnitId]
                  -> [GenericPlanPackage ipkg srcpkg iresult ifailure]
dependencyClosure plan =
    map (planPkgOf plan)
  . concatMap Tree.flatten
  . Graph.dfs (planGraph plan)
  . map (planVertexOf plan)
dependencyClosure plan =
    map (planPkgOf plan)
  . concatMap Tree.flatten
  . Graph.dfs (planGraph plan)
  . map (planVertexOf plan)