-
Notifications
You must be signed in to change notification settings - Fork 29
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
Expand failure tracking in NonDet
#261
Comments
A somewhat simpler approach: since call stacks from I guess hardcoded |
Yeah, I guess it would be neat if you effectively had an "error" type associated with it that got "thrown" from I guess the thing that would be neat would be if there was a
|
Which starts looking a lot like |
Somewhat related: haskell/core-libraries-committee#301 |
NonDet
s ability to track where you hitempty
is quite nice, and helps with a classic problem of non-deterministic searches: knowing why you failed to find a solution.However, the current approach only gives you call stacks. It would be nice in many cases to give a human-readable message or error.
I'm not really sure what the right design here is. The current version requires altering the calls to
empty
, which is a bit awkward and requires writing custom versions ofAlternative
functions. I wonder if we could do something like:Empty
.empty
sets empty failure contextinterpose
to add failure context to any failures within a lexical scopeThe text was updated successfully, but these errors were encountered: