fgl icon indicating copy to clipboard operation
fgl copied to clipboard

Fix implementation of rc in TransClos.

Open LambdaP opened this issue 6 years ago • 1 comments

As observed in issue #86, the implementation of the function rc in the module Data.Graph.Inductive.Query.TransClos computes the graph with only the self-loops, rather than the reflexive closure of a graph.

This change conserves the existing edges, although it drops their labels in the process to satisfy the desired type of the function.

LambdaP avatar Apr 06 '19 14:04 LambdaP

This looks sensible, but could you add a test?

athas avatar Sep 24 '22 07:09 athas

No. It has been three years since I worked to understand the code of this library. I don’t have time or motivation to go back to it now.

You’re welcome to use the code I contributed in any way you see fit. It would be a good idea, given how obviously wrong the original code is. But I’m not putting in more work for a one line commit that was ignored for that long (likely through no fault of your own).

LambdaP avatar Nov 07 '22 23:11 LambdaP

@athas @LambdaP : You might be interested in:

  • https://github.com/koalaman/shellcheck/issues/2677

Please make extra sure that this PR did not introduce any problems (like the exception reported there). You might be able to harvest a test case from there...

andreasabel avatar Feb 04 '23 10:02 andreasabel