Function dependencies.
An experimental CLI tool for visualization of elm declaration dependencies.
-
Make sure the graphviz toolset is installed on your system.
-
Install
hacked-elm
binary (NOTE: This is modified version of elm compiler which writes out function usage data into file.)git clone [email protected]:jhrcek/compiler.git --branch hackCanonicalAST cd compiler stack install
That should make the
hacked-elm
available on your path. You won't use this binary directly, it's used automatically by thefundeps
tool installed next. -
Install
fundeps
binarygit clone [email protected]:jhrcek/fundeps.git cd fundeps stack install
This should make
fundeps
binary available on your PATH.
Move to a folder with elm project (where your elm.json is) and run
fundeps path/to/Main.elm
This 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)