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

Show nicer error on pattern match fail #30

Open
brandonchinn178 opened this issue Sep 17, 2024 · 0 comments
Open

Show nicer error on pattern match fail #30

brandonchinn178 opened this issue Sep 17, 2024 · 0 comments
Milestone

Comments

@brandonchinn178
Copy link
Owner

In tests, it can be useful to pattern match with MonadFail:

Just x <- parseFoo "foo"

The current error is somewhat helpful:

user error (Pattern match failure in 'do' block at test/FooSpec.hs:21:15-26)

We should special case this failure and show it nicely, displaying the source code like a normal test failure

@brandonchinn178 brandonchinn178 added this to the v0.2.0 milestone Sep 17, 2024
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

No branches or pull requests

1 participant