-
Notifications
You must be signed in to change notification settings - Fork 159
Hol err datatype #1656
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
base: develop
Are you sure you want to change the base?
Hol err datatype #1656
Conversation
Ouch. Selftests are failing because of a change to the batch-mode error reporting. Will be a few days before I clean this up. But a |
This is now ready. There weren't many problems with the selftests. I haven't looked at MoscowML. But, as I wrote above, at least two things need to be improved once this change is (I hope) accepted.
The mode distinction and its treatment is straightforward (Michael's code):
Basically ... Having looked at it a bit more, I wonder whether the invocation of |
Improvements to
HOL_ERR
. Currently HOL error messages get unnecessarily repeated as various layers of handling unwind, both in the REPL and in batch mode. This PR changes the representing type forHOL_ERR
to be a 1-constructor datatype wrapping the current record type, then adds a prettyprinter for the datatype. This lets the REPL printHOL_ERR
s that propagate to the top level only once. For batch processing, the originalHOL_ERR
can be printed and then further error messages are minimized.There is still some fine-tuning to be done on the look-and-feel of messages, in particular for "user-facing" tools. For example, type inference failures are annoyingly repeated, as are other parse failures. I also haven't looked at whether the inductive type definition failures need cleaning up.
Not sure how this will impact CakeML. Hopefully not much