GitXplorerGitXplorer
m

graphmod-plugin

public
9 stars
1 forks
2 issues

Commits

List of commits on branch master.
Verified
3930b77a1edc4d8ef151e26cb3bbcb057e5e88fd

Merge pull request #6 from jrp2014/patch-1

mmpickering committed 5 years ago
Verified
dae9f68eb26e8451a88b465ba1eb308cf88a94cd

Update Args.hs

jjrp2014 committed 5 years ago
Verified
1a7fe9aee1d0ed3a73222a7a25510cca5dbc5c7b

Update Args.hs

jjrp2014 committed 5 years ago
Unverified
15bdbc587d2e2ad6d5145c51320e8e6bd2fe459a

Update README

mmpickering committed 6 years ago
Unverified
241a92147286da4989638f5b029f19503c88e209

Add missing nixpkgs.nix

mmpickering committed 6 years ago
Unverified
f3ea70a9f9dbc3fe6a6340b6b0d0958443943aab

Update default.nix

mmpickering committed 6 years ago

README

The README file for this repository.

This is a reimplementation of graphmod using a source plugin.

The advantage is that the implementation is simpler and more robust as it doesn't rely on lexing source files are finding files on disk. Instead, we just serialise this information from the internal compiler state to generate the graph.

The plugin is also an example of the design pattern of recording information as the plugin runs and then collating information at the end.

graphmod was originally written by Thomas Halgren and Iavor Diatchki.

Manual Usage

In order to run the plugin manually, pass the options appropiately to GHC when compiling your package.

-fplugin=GraphMod -fplugin-opt GraphMod:output

Then, call the graphmod-plugin executable passing the --indir flag to indicate where the plugin stored the information.

graphmod-plugin --indir output

You can this pass this output to dot in order to generate an image or pdf.

In addition, graphmod-plugin takes all the options that the old graphmod executable accepted.

Nix Usage

It is recomended to use the plugin with nix which will handle the finalisation and generation steps appropiately. See the default.nix file for how to achieve this.

If you want to try this example then it is strongly recommended to use cachix as otherwise you will build GHC from source.

cachix use mpickering
nix-build