-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Irrefutable pattern exception when inserting edge from non-existent vertex #14
Comments
robstewart57
added a commit
to robstewart57/fgl
that referenced
this issue
Jun 4, 2015
As documented in haskell#14 , an irrefutable pattern exception is thrown when attempting to insert an edge from a vertex that does not exist in the graph, .e.g insEdge (0,1,"foo") (mkGraph [] []) The previous behaviour of fgl was: mkGraph *** Exception: Data/Graph/Inductive/Graph.hs:229:5-38: Irrefutable pattern failed for pattern (Just (pr, _, la, su), g') The new behaviour is: mkGraph *** Exception: insEdge: unable to add edge from non-existent vertex 0
robstewart57
added a commit
to robstewart57/fgl
that referenced
this issue
Jun 5, 2015
As documented in haskell#14 , an irrefutable pattern exception is thrown when attempting to insert an edge from a vertex that does not exist in the graph, .e.g insEdge (0,1,"foo") (mkGraph [] []) The previous behaviour of fgl was: mkGraph *** Exception: Data/Graph/Inductive/Graph.hs:229:5-38: Irrefutable pattern failed for pattern (Just (pr, _, la, su), g') The new behaviour is: mkGraph *** Exception: insEdge: unable to add edge from non-existent vertex 0 closes haskell#14
psteiger
pushed a commit
to psteiger/fgl
that referenced
this issue
Nov 8, 2015
As documented in haskell#14 , an irrefutable pattern exception is thrown when attempting to insert an edge from a vertex that does not exist in the graph, .e.g insEdge (0,1,"foo") (mkGraph [] []) The previous behaviour of fgl was: mkGraph *** Exception: Data/Graph/Inductive/Graph.hs:229:5-38: Irrefutable pattern failed for pattern (Just (pr, _, la, su), g') The new behaviour is: mkGraph *** Exception: insEdge: unable to add edge from non-existent vertex 0 closes haskell#14
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Take the following example:
An evaluation attempt of
test
throws the following exception:The reason this is being thrown is because the vertex indexed with
0
does not exist in the graph I am trying to insert the edge into:I'll send a pull request to add an informative error message in this case.
The text was updated successfully, but these errors were encountered: