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

use #check_failure command to erase errors #131

Merged
merged 8 commits into from
Apr 21, 2024

Conversation

Seasawher
Copy link
Contributor

see: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/the.20metaprogramming.20book/near/386542851

There seems to be an intentional error in the code, which will be an obstacle when you try to update Lean version later.

As a way to indicate errors while avoiding them, I suggest the following.

  • Import std and use #guard_msgs. Use --# to ensure that they don't remain in markdown.
  • Use #check_failure.
  • comment out the relevant section.

This PR pointed out where errors can be avoided simply by using #check_failure.I would like to hear your views on where check_failure cannot be used.

Thank you.

@Julian
Copy link
Collaborator

Julian commented Feb 13, 2024

As I mentioned in Zulip I'm not 100% comfortable here given I actually have not read the book yet :D -- if no one else chimes in I'm comfortable enough though that you know the right thing :) given your contributions -- but I do think if we use these that the text of the book should at least mention what #check_failure does in an aside, in case the reader isn't familiar with what it's for. Does that make sense?

@Seasawher
Copy link
Contributor Author

Thanks for your comment.

  • I haven't read this book thoroughly either, so maybe I should read it properly before submitting a PR again.

  • You are right, if we use check_failure, we should mention it somewhere in the text.

@Seasawher Seasawher marked this pull request as ready for review April 20, 2024 03:50
@Seasawher
Copy link
Contributor Author

@Julian Review please.

@Julian
Copy link
Collaborator

Julian commented Apr 21, 2024

Looks good I think. Thanks again!

@Julian Julian merged commit 4ffaf96 into leanprover-community:master Apr 21, 2024
5 checks passed
@Seasawher Seasawher deleted the using-check-failure branch April 21, 2024 08:31
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