Data.Graph nitpicks

David Feuer david.feuer at
Mon Feb 9 23:24:16 UTC 2015

On Feb 9, 2015 6:16 PM, "Andreas Voellmy" <andreas.voellmy at> wrote:
> Hi folks,
> I was just using the stronglyConnComp function in Data.Graph and found
some minor annoying things:
> 1. stronglyConnComp takes an out-list as input. On the other hand, none
of the other graph algorithms, like dfs, etc do
this. stronglyConnComp seems to basically be an algorithm on graphs, so why
doesn't it take the graph as input? Can we change stronglyConnComp to take
a graph as input? That would make the interface more uniform.

I can confidently answer this in the negative. The maintainers of
containers are on the conservative end of the spectrum. The chances are
much, much better of adding a new function with the interface you want. It
looks like the current approach is more flexible, but I don't know if it's
usefully so.

> 2. Why is stronglyConnComp in a special haddock section whereas all the
other algorithms are in the "Algorithms" section? How about we group it
with all the other algorithms?

Submit a pull request.

> 3. Why are there are so few instances of SCC? In particular, why not
derive Show and Eq?

Submit a pull request for Show. I don't think deriving Eq is correct,
because different orderings may represent the same SCC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list