r/haskell•
RogueToad

Any way to visualise module inter-dependencies?

question

As a beginner to writing larger programs, the overall organisation of my codebase is getting a bit messy, so I figure being able to visualise all the dependencies between my modules would be very handy as I attempt to refactor. Does something like this ghc-pkg command exist for internal modules?

Alternatively if I'm barking up the wrong tree and there's an entirely different way I should approach this problem, I'd appreciate any tips.

Posted Jun 19, 2022, 5:20 AM UTC

237
maerwald•
17
RogueToadOP•

Ah yes, that looks perfect. Thanks 👍

Edit: And it works great!

6
ocharles•
7
RogueToadOP•

Wow, this really makes my code look depressingly scrambled...

2
brandonchinn178•

stack dot?

3
RogueToadOP•

Definitely handy to know about, but it looks like stack dot is more for visualising dependencies between packages (incl. external), not modules.

2
brandonchinn178•

Ah you're right! Sorry

3