[Haskell-cafe] Possible FGL bug

Neil Brown nccb2 at kent.ac.uk
Wed Nov 25 11:02:22 EST 2009


David Menendez wrote:
> From what I can tell, insEdge inserts an edge between two nodes which
> are already in the graph. The code is calling insEdge on
> arbitrarily-labeled nodes, which may not exist in the graph.
>   
That's what I thought initially, but in fact what it is doing is exactly 
what you suggest:
> Instead of picking arbitrary node labels, try selecting arbitrary
> elements from the list of node labels.
>
>   
That "nGen = elements ns" line assigns into nGen a random generator that 
will pick from ns, the list of nodes.

Thanks,

Neil.



More information about the Haskell-Cafe mailing list