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

Restoring the old error handler in Errors.catch_errors_aux #2965

Merged
merged 2 commits into from
Jun 15, 2023

Conversation

nikswamy
Copy link
Collaborator

FStar.Errors.catch_errors_aux is used to trap errors that can be raised in a function and to return back any issues rather than adding them to the default error handler. However, in case the error raised was a fatal error (e.g., Failure), then this function would not restore the original error handler, leading to very confusing behavior at the top-level, e.g., a tactic could fail saying issues were reported, but actually none would be reported. With Guido, we fixed this so that this function always finally restores the original error handler.

Additionally, in FStar.Tactics.Basic, in the functions that provide user-facing callbacks to the typechecker, we also trap fatal errors (e.g., violation of locally nameless convention) and return them to the caller as issues.

This addresses problems as seen in FStarLang/steel#17

@nikswamy nikswamy merged commit 072de71 into master Jun 15, 2023
@nikswamy nikswamy deleted the nik_catch_errors branch June 15, 2023 01:04
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.

2 participants