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

pp.raw not affecting signature printing #6090

Closed
nomeata opened this issue Nov 15, 2024 · 0 comments · Fixed by #6181
Closed

pp.raw not affecting signature printing #6090

nomeata opened this issue Nov 15, 2024 · 0 comments · Fixed by #6181
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@nomeata
Copy link
Collaborator

nomeata commented Nov 15, 2024

Description

Using pp.raw to debug issues related to types doesn’t work as expected.

Steps to Reproduce

With set_option pp.raw true I’d expect to see all the gory details below, but #check doesn’t seem to heed it, and #print doesn’t seem to heed it when printing signatures.

def foo : Nat → Nat
 | 0 => 0
 | n => n

set_option pp.raw true

/-- info: foo : Nat → Nat -/
#guard_msgs in
#check foo

/-- info: id.{1} (Nat -> Nat) foo : Nat -> Nat -/
#guard_msgs in
#check id (@foo)

/--
info: def foo : Nat -> Nat :=
fun (x._@._hyg.7 : Nat) => foo.match_1.{1} (fun (x._@._hyg.7.18 : Nat) => Nat) x._@._hyg.7 (fun (_ : Unit) => OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) (fun (n : Nat) => n)
-/
#guard_msgs in
#print foo

/-- info: Bool.true : Bool -/
#guard_msgs in
#check true

/-- info: constructor Bool.true : Bool -/
#guard_msgs in
#print true

Expected behavior: [Clear and concise description of what you expect to happen]

Actual behavior: [Clear and concise description of what actually happens]

Versions

Lean 4.15.0-nightly-2024-11-15
Target: x86_64-unknown-linux-gnu

Impact

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

@nomeata nomeata added the bug Something isn't working label Nov 15, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Nov 22, 2024
kmill added a commit to kmill/lean4 that referenced this issue Nov 23, 2024
This PR fixes a bug where the signature pretty printer would ignore the current setting of `pp.raw`. This fixes an issue where `#check ident` would not heed `pp.raw`. Closes leanprover#6090.
github-merge-queue bot pushed a commit that referenced this issue Nov 23, 2024
This PR fixes a bug where the signature pretty printer would ignore the
current setting of `pp.raw`. This fixes an issue where `#check ident`
would not heed `pp.raw`. Closes #6090.
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-medium We may work on this issue if we find the time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants