feat: add instance from CoeSort to CoeTail

This commit is contained in:
Leonardo de Moura 2021-08-18 20:24:43 -07:00
parent 99e8a98f06
commit 107712f8be
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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 ()) ()