ANN: New version of graphmod (1.2.4)

Hello, I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs. The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When this option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module. For example, consider the following modules: module A where { import B; import C } module B where { import C } module C where { } When generated with `--prune-edges`, the resulting graph will be: A -> B -> C Note that there is no edge from `A` to `C`, because `C` is already imported by `B`. Happy hacking, -Iavor

On 10/03/2014 07:37 PM, Iavor Diatchki wrote:
Hello,
I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs.
The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When this option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module.
For example, consider the following modules:
module A where { import B; import C } module B where { import C } module C where { }
When generated with `--prune-edges`, the resulting graph will be:
A -> B -> C
Note that there is no edge from `A` to `C`, because `C` is already imported by `B`.
Happy hacking, -Iavor
Hi, It'd be great if the project page showed an example use and the generated graph. Does it work with possibly mutually-importing boot files? -- Mateusz K.

Hello,
Good idea! I made a little web-page with examples and screenshots. Have a
look:
https://github.com/yav/graphmod/wiki
Indeed, mutually-recursive modules are not a problem. There is an example
of some mutually-recursive modules in the screen-shot from GHC's
type-checker.
By the way, I also added some support for modules that contains CPP, and
improved the layout of the graphs a bit, so the current version is 1.2.5.
Cheers,
-Iavor
On Fri, Oct 3, 2014 at 12:43 PM, Mateusz Kowalczyk
On 10/03/2014 07:37 PM, Iavor Diatchki wrote:
Hello,
I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs.
The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When this option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module.
For example, consider the following modules:
module A where { import B; import C } module B where { import C } module C where { }
When generated with `--prune-edges`, the resulting graph will be:
A -> B -> C
Note that there is no edge from `A` to `C`, because `C` is already imported by `B`.
Happy hacking, -Iavor
Hi,
It'd be great if the project page showed an example use and the generated graph.
Does it work with possibly mutually-importing boot files?
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 10/04/2014 01:33 AM, Iavor Diatchki wrote:
Hello,
Good idea! I made a little web-page with examples and screenshots. Have a look:
https://github.com/yav/graphmod/wiki
Indeed, mutually-recursive modules are not a problem. There is an example of some mutually-recursive modules in the screen-shot from GHC's type-checker.
By the way, I also added some support for modules that contains CPP, and improved the layout of the graphs a bit, so the current version is 1.2.5.
Cheers, -Iavor
That helped a lot. I packaged graphmod (and xdot) on NixOS. It graphviz kept segfaulting[2] on the file produced for Yi repository but in the end it worked after I added ‘-p’ to graphmod. Also --no-cluster view at [3]. Is there any plan for graphmod to do rendering itself, such as to PNG? I also wonder if there's any way to highlight cyclic paths, useful when trying to get rid of boot files. [1]: http://fuuzetsu.co.uk/images/1412407628.png [2]: libpath/shortest.c:324: triangulation failed libpath/shortest.c:192: source point not in any triangle Error: in routesplines, Pshortestpath failed out of memory [3]: http://fuuzetsu.co.uk/images/1412407805.png
On Fri, Oct 3, 2014 at 12:43 PM, Mateusz Kowalczyk
wrote: On 10/03/2014 07:37 PM, Iavor Diatchki wrote:
Hello,
I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs.
The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When this option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module.
For example, consider the following modules:
module A where { import B; import C } module B where { import C } module C where { }
When generated with `--prune-edges`, the resulting graph will be:
A -> B -> C
Note that there is no edge from `A` to `C`, because `C` is already imported by `B`.
Happy hacking, -Iavor
Hi,
It'd be great if the project page showed an example use and the generated graph.
Does it work with possibly mutually-importing boot files?
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Mateusz K.

On 4 October 2014 17:34, Mateusz Kowalczyk
On 10/04/2014 01:33 AM, Iavor Diatchki wrote:
Hello,
Good idea! I made a little web-page with examples and screenshots. Have a look:
https://github.com/yav/graphmod/wiki
Indeed, mutually-recursive modules are not a problem. There is an example of some mutually-recursive modules in the screen-shot from GHC's type-checker.
By the way, I also added some support for modules that contains CPP, and improved the layout of the graphs a bit, so the current version is 1.2.5.
Cheers, -Iavor
That helped a lot. I packaged graphmod (and xdot) on NixOS. It graphviz kept segfaulting[2] on the file produced for Yi repository but in the end it worked after I added ‘-p’ to graphmod. Also --no-cluster view at [3].
Is there any plan for graphmod to do rendering itself, such as to PNG? I also wonder if there's any way to highlight cyclic paths, useful when trying to get rid of boot files.
To do self-rendering, you would need to have a haskell implementation of a graph layout algorithm, and then a way to do the rendering (which could admittedly be done with digrams).
[1]: http://fuuzetsu.co.uk/images/1412407628.png [2]: libpath/shortest.c:324: triangulation failed libpath/shortest.c:192: source point not in any triangle Error: in routesplines, Pshortestpath failed out of memory [3]: http://fuuzetsu.co.uk/images/1412407805.png
On Fri, Oct 3, 2014 at 12:43 PM, Mateusz Kowalczyk
wrote: On 10/03/2014 07:37 PM, Iavor Diatchki wrote:
Hello,
I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs.
The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When this option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module.
For example, consider the following modules:
module A where { import B; import C } module B where { import C } module C where { }
When generated with `--prune-edges`, the resulting graph will be:
A -> B -> C
Note that there is no edge from `A` to `C`, because `C` is already imported by `B`.
Happy hacking, -Iavor
Hi,
It'd be great if the project page showed an example use and the generated graph.
Does it work with possibly mutually-importing boot files?
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

Hello, Yeah, I've seen the crushes on large graphs too---looks like a bug in graphviz, perhaps we should report it. I have some code for laying out graphs using a force based algorithm, but graphiz does quite a lot (e.g., supports many different formats), so I don't have any immediate plans to write a render. My next task for `graphmod` is to implement `Cabal` support, so that you could easily visualize a package. Cheers, -Iavor On Sat, Oct 4, 2014 at 1:04 AM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
On 4 October 2014 17:34, Mateusz Kowalczyk
wrote: On 10/04/2014 01:33 AM, Iavor Diatchki wrote:
Hello,
Good idea! I made a little web-page with examples and screenshots. Have a look:
https://github.com/yav/graphmod/wiki
Indeed, mutually-recursive modules are not a problem. There is an example of some mutually-recursive modules in the screen-shot from GHC's type-checker.
By the way, I also added some support for modules that contains CPP, and improved the layout of the graphs a bit, so the current version is 1.2.5.
Cheers, -Iavor
That helped a lot. I packaged graphmod (and xdot) on NixOS. It graphviz kept segfaulting[2] on the file produced for Yi repository but in the end it worked after I added ‘-p’ to graphmod. Also --no-cluster view at [3].
Is there any plan for graphmod to do rendering itself, such as to PNG? I also wonder if there's any way to highlight cyclic paths, useful when trying to get rid of boot files.
To do self-rendering, you would need to have a haskell implementation of a graph layout algorithm, and then a way to do the rendering (which could admittedly be done with digrams).
[1]: http://fuuzetsu.co.uk/images/1412407628.png [2]: libpath/shortest.c:324: triangulation failed libpath/shortest.c:192: source point not in any triangle Error: in routesplines, Pshortestpath failed out of memory [3]: http://fuuzetsu.co.uk/images/1412407805.png
On Fri, Oct 3, 2014 at 12:43 PM, Mateusz Kowalczyk <
wrote:
On 10/03/2014 07:37 PM, Iavor Diatchki wrote:
Hello,
I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs.
The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When
fuuzetsu@fuuzetsu.co.uk> this
option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module.
For example, consider the following modules:
module A where { import B; import C } module B where { import C } module C where { }
When generated with `--prune-edges`, the resulting graph will be:
A -> B -> C
Note that there is no edge from `A` to `C`, because `C` is already imported by `B`.
Happy hacking, -Iavor
Hi,
It'd be great if the project page showed an example use and the generated graph.
Does it work with possibly mutually-importing boot files?
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Note that if you just want graphviz to do the layout, but do the rendering
yourself, e.g. with diagrams, this is not too hard. This doesn't help with
getting rid of the graphviz dependency, but it certainly helps with making
nicer-looking graphs or with tweaking the visualization based on arbitrary
criteria. Ivan's graphviz package allows for round-tripping a graph data
structure through graphviz, and you get it back with location annotations;
you can then draw it however you like. I actually did this for a couple
figures in my dissertation. Perhaps at some point in the near future I will
package up the code into a nice module in diagrams-contrib.
-Brent
On Sat, Oct 4, 2014 at 11:22 AM, Iavor Diatchki
Hello,
Yeah, I've seen the crushes on large graphs too---looks like a bug in graphviz, perhaps we should report it.
I have some code for laying out graphs using a force based algorithm, but graphiz does quite a lot (e.g., supports many different formats), so I don't have any immediate plans to write a render.
My next task for `graphmod` is to implement `Cabal` support, so that you could easily visualize a package.
Cheers, -Iavor
On Sat, Oct 4, 2014 at 1:04 AM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
On 4 October 2014 17:34, Mateusz Kowalczyk
wrote: On 10/04/2014 01:33 AM, Iavor Diatchki wrote:
Hello,
Good idea! I made a little web-page with examples and screenshots. Have a look:
https://github.com/yav/graphmod/wiki
Indeed, mutually-recursive modules are not a problem. There is an example of some mutually-recursive modules in the screen-shot from GHC's type-checker.
By the way, I also added some support for modules that contains CPP, and improved the layout of the graphs a bit, so the current version is 1.2.5.
Cheers, -Iavor
That helped a lot. I packaged graphmod (and xdot) on NixOS. It graphviz kept segfaulting[2] on the file produced for Yi repository but in the end it worked after I added ‘-p’ to graphmod. Also --no-cluster view at [3].
Is there any plan for graphmod to do rendering itself, such as to PNG? I also wonder if there's any way to highlight cyclic paths, useful when trying to get rid of boot files.
To do self-rendering, you would need to have a haskell implementation of a graph layout algorithm, and then a way to do the rendering (which could admittedly be done with digrams).
[1]: http://fuuzetsu.co.uk/images/1412407628.png [2]: libpath/shortest.c:324: triangulation failed libpath/shortest.c:192: source point not in any triangle Error: in routesplines, Pshortestpath failed out of memory [3]: http://fuuzetsu.co.uk/images/1412407805.png
On Fri, Oct 3, 2014 at 12:43 PM, Mateusz Kowalczyk <
wrote:
On 10/03/2014 07:37 PM, Iavor Diatchki wrote:
Hello,
I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs.
The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When
fuuzetsu@fuuzetsu.co.uk> this
option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module.
For example, consider the following modules:
module A where { import B; import C } module B where { import C } module C where { }
When generated with `--prune-edges`, the resulting graph will be:
A -> B -> C
Note that there is no edge from `A` to `C`, because `C` is already imported by `B`.
Happy hacking, -Iavor
Hi,
It'd be great if the project page showed an example use and the generated graph.
Does it work with possibly mutually-importing boot files?
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

dot crashes for me as well on graphmod's output for Agda, even with option -p to graphmod. dot - graphviz version 2.26.3 (20100126.1600) (Generated .dot file attached) Cheers, Andreas On 04.10.2014 09:34, Mateusz Kowalczyk wrote:
On 10/04/2014 01:33 AM, Iavor Diatchki wrote:
Hello,
Good idea! I made a little web-page with examples and screenshots. Have a look:
https://github.com/yav/graphmod/wiki
Indeed, mutually-recursive modules are not a problem. There is an example of some mutually-recursive modules in the screen-shot from GHC's type-checker.
By the way, I also added some support for modules that contains CPP, and improved the layout of the graphs a bit, so the current version is 1.2.5.
Cheers, -Iavor
That helped a lot. I packaged graphmod (and xdot) on NixOS. It graphviz kept segfaulting[2] on the file produced for Yi repository but in the end it worked after I added ‘-p’ to graphmod. Also --no-cluster view at [3].
Is there any plan for graphmod to do rendering itself, such as to PNG? I also wonder if there's any way to highlight cyclic paths, useful when trying to get rid of boot files.
[1]: http://fuuzetsu.co.uk/images/1412407628.png [2]: libpath/shortest.c:324: triangulation failed libpath/shortest.c:192: source point not in any triangle Error: in routesplines, Pshortestpath failed out of memory [3]: http://fuuzetsu.co.uk/images/1412407805.png
On Fri, Oct 3, 2014 at 12:43 PM, Mateusz Kowalczyk
wrote: On 10/03/2014 07:37 PM, Iavor Diatchki wrote:
Hello,
I am pleased to announce a new version of `graphmod`---a program that helps you visualize the import dependencies between the modules in your Haskell programs.
The new feature in version 1.2.4 is support for pruning the dependency graph, which is enabled with the flag -p or --prune-edges. When this option is selected, `graphmod` will ignore imports to modules that are already imported by some of the dependencies of the module.
For example, consider the following modules:
module A where { import B; import C } module B where { import C } module C where { }
When generated with `--prune-edges`, the resulting graph will be:
A -> B -> C
Note that there is no edge from `A` to `C`, because `C` is already imported by `B`.
Happy hacking, -Iavor
Hi,
It'd be great if the project page showed an example use and the generated graph.
Does it work with possibly mutually-importing boot files?
-- Mateusz K. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel@gu.se http://www2.tcs.ifi.lmu.de/~abel/
participants (5)
-
Andreas Abel
-
Brent Yorgey
-
Iavor Diatchki
-
Ivan Lazar Miljenovic
-
Mateusz Kowalczyk