Make Data.Graph.Inductive.NodeMap handle slightly messy input without crashing
Using the current version of Data.Graph.Inductive casually is unnecessarily difficult because if you insert a node that's already present in the graph, or try to insert an edge with an endpoint that's not already in the graph, the library crashes. For the raw graph operations that's somewhat reasonable since it wouldn't know what labels to use. NodeMap, on the other hand, has plenty of information, so this patch makes it safer in these cases.
I've also added the beginning of a test suite runnable with runhaskell Setup.hs test
.
Trac metadata
Trac field | Value |
---|---|
Version | 6.6 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries (other) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | erwig@eecs.oregonstate.edu, jyasskin@gmail.com |
Operating system | Unknown |
Architecture | Unknown |