You can use stack to visualize the dependencies between your projects and optionally also external dependencies.
As an example, let's look at wreq
:
$ stack dot | dot -Tpng -o wreq.png
Okay that is a little boring, let's also look at external dependencies:
$ stack dot --external | dot -Tpng -o wreq.png
Well that is certainly a lot. As a start we can exclude base
and then depending on our needs we can either limit the depth:
$ stack dot --no-include-base --external --depth 1 | dot -Tpng -o wreq.png
or prune packages explicitly:
$ stack dot --external --prune base,lens,wreq-examples,http-client,aeson,tls,http-client-tls,exceptions | dot -Tpng -o wreq_pruned.png
Keep in mind that you can also save the dot file:
$ stack dot --external --depth 1 > wreq.dot
$ dot -Tpng -o wreq.png wreq.dot
and pass in options to dot
or use another graph layout engine like twopi
:
$ stack dot --external --prune base,lens,wreq-examples,http-client,aeson,tls,http-client-tls,exceptions | twopi -Groot=wreq -Goverlap=false -Tpng -o wreq_pruned.png