haskell / fgl

A Functional Graph Library for Haskell
http://hackage.haskell.org/package/fgl
Other
185 stars 54 forks source link

The insMapEdge family of functions are partial #98

Closed TOTBWF closed 11 months ago

TOTBWF commented 3 years ago

The insMapEdge family of functions are partial, and will crash when you try to add an edge where one of the nodes doesn't exist in the graph. This doesn't appear to be documented anywhere. Perhaps it would make sense to either return a Maybe, or at the very least make this a no-op.

athas commented 11 months ago

Changing the type would break compatibility, which I am reluctant to do, but we can at least document that they are partial.