Skip to content
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

Informative error message for insEdge #16

Closed

Conversation

robstewart57
Copy link
Contributor

As documented in #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 #14

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
robstewart57 referenced this pull request in robstewart57/fgl 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
@ivan-m
Copy link
Contributor

ivan-m commented Jul 13, 2015

Merged manually. Thanks for this!

@ivan-m ivan-m closed this Jul 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Irrefutable pattern exception when inserting edge from non-existent vertex
2 participants