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

Case expression prints badly #1086

Open
mn200 opened this issue Jan 10, 2023 · 1 comment
Open

Case expression prints badly #1086

mn200 opened this issue Jan 10, 2023 · 1 comment

Comments

@mn200
Copy link
Member

mn200 commented Jan 10, 2023

The definition

Definition a_def:
  a x =
  case x of
  | y::ys => if y = T then SOME y else SOME F
  | [] => NONE
End

parses correctly, but prints as

val a_def =
   ⊢ ∀x. a x = case x of [] => NONE | T::ys => SOME y | y::ys => SOME F: thm

where the y in the second clause is printed as a free variable (just as it appears), even though it’s actually the y of the first branch of the definition, and thus bound.

@mn200
Copy link
Member Author

mn200 commented Jan 10, 2023

Thanks to Arve Gengelbach for the bug report.

@mn200 mn200 changed the title Case expression printed badly Case expression prints badly Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant