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

Identifier pretty-printing can clash with notation #4686

Closed
3 tasks
eric-wieser opened this issue Jul 8, 2024 · 0 comments · Fixed by #4979
Closed
3 tasks

Identifier pretty-printing can clash with notation #4686

eric-wieser opened this issue Jul 8, 2024 · 0 comments · Fixed by #4979
Labels
bug Something isn't working P-low We are not planning to work on this issue

Comments

@eric-wieser
Copy link
Contributor

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

Identifiers that clash with syntax are not escaped when pretty-printing. As a result, the content of the goal view cannot be pasted into the source file.

Context

Zulip thread

Steps to Reproduce

  1. Run the following:
variable («forall» : Nat)

#check «forall» + 1 -- forall + 1 : Nat

-- paste what we got from the goal view
#check forall + 1 -- syntax error

Expected behavior: The output of the first #check should rountrip; probably, it should be «forall» + 1 : Nat.

Actual behavior: The escaping of forall is lost, resulting in a syntax error. set_option pp.all true does not help.

Versions

4.10.0-rc1

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@eric-wieser eric-wieser added the bug Something isn't working label Jul 8, 2024
@leanprover-bot leanprover-bot added the P-low We are not planning to work on this issue label Aug 2, 2024
kmill added a commit to kmill/lean4 that referenced this issue Aug 10, 2024
kmill added a commit to kmill/lean4 that referenced this issue Sep 7, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 7, 2024
For example, if `forall` is a variable, it now pretty prints as
`«forall»`.

Closes #4686
tobiasgrosser pushed a commit to opencompl/lean4 that referenced this issue Sep 16, 2024
…er#4979)

For example, if `forall` is a variable, it now pretty prints as
`«forall»`.

Closes leanprover#4686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-low We are not planning to work on this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants