[Haskell-cafe] FGL Question

Hans van Thiel hthiel.char at zonnet.nl
Mon May 25 06:45:13 EDT 2009

> Hi Hans,
> I believe the problem is to do with the inductive nature of the FGL 
> library.  A graph in FGL is a series of contexts, each corresponding to 
> a node.  Each context contains lists of links to/from the latest node to 
> nodes in previous contexts.  Each link is only recorded once, and 
> whether it appears in the context for the source or destination node 
> depends on the order that the graph is constructed.  
Ah, that was my mistake! I thought a context was an 'in' adjacency list,
a node, a label and and 'out' adjacency list, and this for each node. So
each link would be recorded twice! Based on this assumption I tried to,
and thought I did, construct a new unconnected graph.


Based on the idea that gsel didn't work as I expected, I already found a
workaround, but your example solutions look better. I'll look at my code
again. Many thanks for your helpful reply!

Best Regards,

Hans van Thiel

More information about the Haskell-Cafe mailing list