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

[Merged by Bors] - fix(checker/text_import): make leanchecker agree with external tc #574

Closed
wants to merge 2 commits into from

Conversation

digama0
Copy link
Member

@digama0 digama0 commented May 9, 2021

The change to text_import.cpp checks the line for parse errors after
parsing, so we don't accidentally let malformed lines pass.

The change to the kernel removes the check for anonymous names in
lambda/let/pi. Since these are used only for pretty printing it should
not affect soundness. An alternative approach would be to automatically
generate a fresh name when the given name is anonymous.

See https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/rejected.20by.20leanchecker.20but.20accepted.20by.20trepplein

The change to `text_import.cpp` checks the line for parse errors after
parsing, so we don't accidentally let malformed lines pass.

The change to the kernel removes the check for anonymous names in
lambda/let/pi. Since these are used only for pretty printing it should
not affect soundness. An alternative approach would be to automatically
generate a fresh name when the given name is anonymous.
@@ -224,6 +226,10 @@ struct text_importer {
} else {
throw exception(sstream() << "unknown command: " << cmd);
}
in >> std::ws;
Copy link
Member

@dwrensha dwrensha May 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On MacOS, this line (in >> std::ws;) is causing in.fail() to flip to true.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is in.eof() true before the call to std::ws?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@gebner
Copy link
Member

gebner commented May 10, 2021

Thanks!

bors r+

bors bot pushed a commit that referenced this pull request May 10, 2021
The change to `text_import.cpp` checks the line for parse errors after
parsing, so we don't accidentally let malformed lines pass.

The change to the kernel removes the check for anonymous names in
lambda/let/pi. Since these are used only for pretty printing it should
not affect soundness. An alternative approach would be to automatically
generate a fresh name when the given name is anonymous.

See https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/rejected.20by.20leanchecker.20but.20accepted.20by.20trepplein
@bors
Copy link

bors bot commented May 10, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(checker/text_import): make leanchecker agree with external tc [Merged by Bors] - fix(checker/text_import): make leanchecker agree with external tc May 10, 2021
@bors bors bot closed this May 10, 2021
@bors bors bot deleted the leanchecker_fix branch May 10, 2021 07:24
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.

None yet

3 participants