Function dependencies.
An experimental CLI tool for visualization of elm declaration dependencies.
-
Make sure the graphviz toolset is installed on your system.
-
Install
hacked-elmbinary (NOTE: This is modified version of elm compiler which writes out function usage data into file.)git clone git@github.com:jhrcek/compiler.git --branch hackCanonicalAST cd compiler stack installThat should make the
hacked-elmavailable on your path. You won't use this binary directly, it's used automatically by thefundepstool installed next. -
Install
fundepsbinarygit clone git@github.com:jhrcek/fundeps.git cd fundeps stack installThis should make
fundepsbinary available on your PATH.
Move to a folder with elm project (where your elm.json is) and run
fundeps path/to/Main.elmThis will
- compile the code with the hacked compiler, collecting data about what functions are used by what other functions
- open repl-like CLI interface, where you can enter function name(s) (with TAB completion) and the tool will display graph of declaration dependencies for you chose function(s)