+1  A: 

In your example:

main = let g = insEdge (0,1,()) $ buildGr [ ([], 0, (), []), ([], 1, (), []) ]
           g' = delEdge (0,1) g
        in if 1 `elem` suc g 0
              then putStrLn "OK"
              else putStrLn "ERROR "

the variable g' is never used. Should the expression suc g 0 be suc g' 0? It seems to me that this should make it print OK...

psmears
I guess `g` contains edge "0->1", and `g'` is where it removed. I guess `suc g 0` generates list of nodes which is directly reachable from node "0" (there is edge "0->x"). So it should produce list `[1]` and print "OK" (which is seen now). adding quote to `g` will make it print "ERROR ".
ony
@ony - You're right, the OK/ERROR are the other way round. I guess I was trusting the question when it says the result is ERROR! I suppose we need more clarification from the questioner on what exactly he means :-)
psmears
I agree my example in the head question isn't clear. Because g and g' must be used then for building the visual representation. E.i. g and g' are arguments a function: <pre>visualRepres :: WeightedDualGraph -> WeightedGraph -> VisualRepresentation ---------------rewritten demo:main = let g = insEdge (0,1,()) $ buildGr [ ([], 0, (), []), ([], 1, (), []) ] g' = delEdge (0,1) g useBoth g1 g2 = edges g1 ++ edges g2 in putStrLn $ "Unioned edges: " ++ show (useBoth g g')</pre>It just prints "Unioned edges: []"
I didn't understand a source of the problem. What did it be? Either compiler snark or my mistake. I have decided to avoid the situation. I have no time. Removing edges have been moved far. This solution has little changed final graph image but it is acceptable.
I have frozen the state in the separate branch "haskell-fgl-snark". If somebody will be interesting.
@daneel-yaitskov: The branch "haskell-fgl-snark" of what? Some sort of git/hg/subversion/etc repository?
psmears