Andrey Mokhov
Andrey Mokhov
@adithyaov I haven't had much time to think about type-safe acyclic graphs yet, so I don't yet have any good answers to your questions. Please try various different approaches and...
@anfelor I agree that the "abstract data type + smart constructors" approach is a nice solution from the pragmatic point of view: it's simple and it solves most of the...
@anfelor Indeed, a partial order is sufficient. Interesting! > But how to we get that partial order? From the perspective of the algebra of graphs, the answer doesn't matter: we...
@TheChouzanOne I think it's useful to have both the MST algorithm returning `Maybe (Tree a)` as well as minimum spanning forest algorithm returning `Forest a`. The former will probably be...
@TheChouzanOne Yes, I think we'll need to add a module like `Data.Tree.Labelled` with the definitions for labelled trees and forests. The `msf` algorithm will then need to return a `Forest...
@TheChouzanOne Thanks, adding an implementation of the BFS algorithm would be great! I suggest that as a first try you copy the existing API of DFS exactly -- note that...
@TheChouzanOne Thanks! For an initial prototype I suggest to implement the following two functions. We might rename them later, and in fact I think we might also rename some DFS...
> is there a particular reason why a transitive closure operator was not included? Yes, it is indeed possible to include it, but I haven't had a chance to study...
@anfelor Thanks for the pointer! I haven't tried it but it looks promising. It will likely not be able to handle all examples, as some of them use function equality....
@nobrakal Thanks for the experiment! These examples look good, but I think there will be many cases where things will start breaking, e.g. there are function comparisons `hasVertex x ....