Home > OS >  Visualize a dependency graph of packages for a cabal project?
Visualize a dependency graph of packages for a cabal project?

Time:07-30

There is ghc-pkg dot but that seems to only work for a ghc package database.

CodePudding user response:

You can use the cabal-plan executable to generate a dependency graph. First install cabal-plan with:

cabal install cabal-plan

Then you can go to your cabal package directory and run:

cabal-plan dot | dot -Tpdf -odeps.pdf

(You have to run cabal build or cabal configure first if you have not done so already)

This will produce a dependency graph in PDF form in the file deps.pdf.

  • Related