chore: rename PtrEqResult.yes ==> PtrEqResult.yesEqual

This commit is contained in:
Leonardo de Moura 2020-03-02 08:29:31 -08:00
parent 0f8b59eed7
commit b379bca28b

View file

@ -48,11 +48,11 @@ k (ptrAddrUnsafe a)
if ptrAddrUnsafe a == ptrAddrUnsafe b then true else k ()
inductive PtrEqResult {α : Type u} (x y : α) : Type
| unknown {} : PtrEqResult
| yes (h : x = y) : PtrEqResult
| unknown {} : PtrEqResult
| yesEqual (h : x = y) : PtrEqResult
@[inline] unsafe def withPtrEqResultUnsafe {α : Type u} {β : Type v} [Subsingleton β] (a b : α) (k : PtrEqResult a b → β) : β :=
if ptrAddrUnsafe a == ptrAddrUnsafe b then k (PtrEqResult.yes lcProof) else k PtrEqResult.unknown
if ptrAddrUnsafe a == ptrAddrUnsafe b then k (PtrEqResult.yesEqual lcProof) else k PtrEqResult.unknown
@[implementedBy withPtrEqUnsafe]
def withPtrEq {α : Type u} (a b : α) (k : Unit → Bool) (h : a = b → k () = true) : Bool :=