Given the set of cabal packages, is there a way to automatically compute a subset of independent packages? In other words, a subset of packages that will be sufficient to install them.
For [network,parsec] answer is [network] because it is network dependent on parsec .
For [network,containers] answer is [network,containers] , because:
network independent of containers- all
network dependencies are containers independent containers independent of network- all
containers dependencies are network independent
It is easy to find the answer to 2 packages. What is really interesting is finding an independent set for [containers, directory, filepath, lens, xml, http-conduit, regex-posix, monad-control, unordered-containers, glib, hashable, hspec, split, aeson, attoparsec, stm, QuickCheck] .
From the answer, I expect some function based on the cabal library, for example ∷ [Packages] → IO [Packages] .
haskell cabal
DMITRY MALIKOV 03 Mar. '13 at 14:35 2013-03-03 14:35
source share