feat: add instance from CoeSort to CoeTail
This commit is contained in:
parent
99e8a98f06
commit
107712f8be
2 changed files with 3 additions and 3 deletions
|
|
@ -100,6 +100,9 @@ instance coeOfDep {α : Sort u} {β : Sort v} (a : α) [CoeDep α a β] : CoeT
|
|||
instance coeId {α : Sort u} (a : α) : CoeT α a α where
|
||||
coe := a
|
||||
|
||||
instance coeSortToCoeTail [inst : CoeSort α β] : CoeTail α β where
|
||||
coe := inst.coe
|
||||
|
||||
/- Basic instances -/
|
||||
|
||||
@[inline] instance boolToProp : Coe Bool Prop where
|
||||
|
|
|
|||
|
|
@ -3,7 +3,4 @@ class Foo (α : Type) where x : α
|
|||
instance : CoeSort (Foo α) Type where
|
||||
coe _ := α
|
||||
|
||||
instance coeSortToCoe [inst : CoeSort α β] : Coe α β where
|
||||
coe := inst.coe
|
||||
|
||||
#check @id (Foo.mk ()) ()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue