Skip to content

A simple application for creating function call graphs between Haskell files for viewing with dot

License

Notifications You must be signed in to change notification settings

dustinnorwood/function-call-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

function-call-graph

This repository generates function call dependency graphs of Haskell files. It is useful for viewing the structure of large libraries, and visualizing the dependencies between subsets of project files.

Build steps

stack init
stack install

Usage

function-call-graph accepts an arbitrary number of filenames as input arguments, including wildcards. Each file is parsed using Haskell's syntax for function declaration and application. In particular, top-level function definitions occur immediately after a newline character.

Example function-call-graph usage

function-call-graph */*.hs | dot -Tsvg -o ~/function-call-graph.svg

function-call-graph function call dependencies

Current limitations

  • Infix operators are not supported.
  • Unicode is not supported.
  • Since this is a very naive parser, some preprocessor directives and text inside quasiquoters get parsed as functions.
  • There's no option to read files or apply a wildcard recursively.

About

A simple application for creating function call graphs between Haskell files for viewing with dot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published