Re: [Haskell-cafe] FGL Question

2009-05-25 Thread Hans van Thiel
[snip] 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

[Haskell-cafe] FGL Question

2009-05-24 Thread Hans van Thiel
Hello, I want to get the top or the bottom elements of a graph, but the following code appears to give the wrong answer in most cases, and the right answer in a few cases. Any ideas? -- get the most general or the least general elements graphMLGen :: Bool - Gr [Rule] () - Gr [Rule] ()

Re: [Haskell-cafe] FGL Question

2009-05-24 Thread Neil Brown
Hans van Thiel wrote: Hello, I want to get the top or the bottom elements of a graph, but the following code appears to give the wrong answer in most cases, and the right answer in a few cases. Any ideas? -- get the most general or the least general elements graphMLGen :: Bool - Gr [Rule]