test: issue reported by Reid
This commit is contained in:
parent
9160949df3
commit
1f8370c67d
1 changed files with 24 additions and 0 deletions
24
tests/elabissues/Reid1.lean
Normal file
24
tests/elabissues/Reid1.lean
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
structure constantFunction (α β : Type) :=
|
||||
(f : α → β)
|
||||
(h : ∀ a₁ a₂, f a₁ = f a₂)
|
||||
|
||||
instance {α β : Type} : HasCoeToFun (constantFunction α β) :=
|
||||
⟨_, constantFunction.f⟩
|
||||
|
||||
def myFun {α : Type} : constantFunction α (Option α) :=
|
||||
{ f := fun a => none,
|
||||
h := fun a₁ a₂ => rfl }
|
||||
|
||||
def myFun' (α : Type) : constantFunction α (Option α) :=
|
||||
{ f := fun a => none,
|
||||
h := fun a₁ a₂ => rfl }
|
||||
|
||||
#check myFun 3
|
||||
#check @myFun Nat 3 -- works
|
||||
|
||||
#check myFun' _ 3
|
||||
#check myFun' Nat 3 -- works
|
||||
|
||||
#check ⇑myFun 3
|
||||
#check ⇑(myFun' _) 3
|
||||
#check ⇑(myFun' Nat) 3
|
||||
Loading…
Add table
Reference in a new issue