When resolving anonymous dot notation (`.ident x y z`), it would reduce the expected type to whnf. Now, it unfolds definitions step-by-step, even if the type synonym is for a pi type like so ```lean def Foo : Prop := ∀ a : Nat, a = a protected theorem Foo.intro : Foo := sorry example : Foo := .intro ``` Closes #4761
17 lines
454 B
Text
17 lines
454 B
Text
/-!
|
|
# Make sure "anonymous dot notation" works with type synonyms.
|
|
-/
|
|
|
|
def Foo : Prop := ∀ a : Nat, a = a
|
|
|
|
protected theorem Foo.intro : Foo := sorry
|
|
example : Foo := .intro
|
|
|
|
/-!
|
|
Making sure that the type synonym `Foo'` still works.
|
|
This used to be unfolded during `forallTelescopeReducing`,
|
|
and now it is "manually" unfolded in the elaboration algorithm.
|
|
-/
|
|
example : Nat → Option Nat := .some
|
|
def Foo' := Nat → Option Nat
|
|
example : Foo' := .some
|