Skip to content
/ fundeps Public

Experimental visualization of elm declaration dependencies

License

Notifications You must be signed in to change notification settings

jhrcek/fundeps

Repository files navigation

fundeps

Function dependencies.

An experimental CLI tool for visualization of elm declaration dependencies.

How to install

⚠️ This tool is still very much work in progress and will change a lot. The following installation steps will likely be simplified in the future

  1. Make sure the graphviz toolset is installed on your system.

  2. Install hacked-elm binary (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 install

    That should make the hacked-elm available on your path. You won't use this binary directly, it's used automatically by the fundeps tool installed next.

  3. Install fundeps binary

    git clone git@github.com:jhrcek/fundeps.git
    cd fundeps
    stack install

    This should make fundeps binary available on your PATH.

How to run it

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)

About

Experimental visualization of elm declaration dependencies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published