Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

bug with pp.implicit and structure fields #1922

Closed
1 task done
semorrison opened this issue Feb 7, 2018 · 0 comments
Closed
1 task done

bug with pp.implicit and structure fields #1922

semorrison opened this issue Feb 7, 2018 · 0 comments

Comments

@semorrison
Copy link
Contributor

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

The following example shows the pretty-printer generating invalid code, when a structure field has implicit arguments

Steps to Reproduce

set_option pp.implicit true

structure C := ( d : Π { X : Type }, list X → list X )

def P(c : C):= c.d [0]

#print P

Actual behavior:

#print P shows:

def P : C → list ℕ :=
λ (c : C), c.d ℕ [0]

however c.d ℕ [0] is invalid notation, because it's missing an @.

Expected behavior:

#print P should show

def P : C → list ℕ :=
λ (c : C), @C.d c ℕ [0]

Versions

Lean (version 3.3.1, commit 6da6c14, RELEASE)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant