Equations
- dbgTraceVal a = dbgTrace (toString a) fun x => a
@[neverExtract, inline]
def
panicWithPos
{α : Type u}
[inst : Inhabited α]
(modName : String)
(line : Nat)
(col : Nat)
(msg : String)
:
α
Equations
- panicWithPos modName line col msg = panic (mkPanicMessage modName line col msg)
@[neverExtract, inline]
def
panicWithPosWithDecl
{α : Type u}
[inst : Inhabited α]
(modName : String)
(declName : String)
(line : Nat)
(col : Nat)
(msg : String)
:
α
Equations
- panicWithPosWithDecl modName declName line col msg = panic (mkPanicMessageWithDecl modName declName line col msg)
@[extern lean_ptr_addr]
Equations
- ptrAddrUnsafe a = 0
@[inline]
unsafe def
withPtrAddrUnsafe
{α : Type u}
{β : Type v}
(a : α)
(k : USize → β)
(h : ∀ (u₁ u₂ : USize), k u₁ = k u₂)
:
β
Equations
- withPtrAddrUnsafe a k h = k (ptrAddrUnsafe a)
@[inline]
unsafe def
withPtrEqUnsafe
{α : Type u}
(a : α)
(b : α)
(k : Unit → Bool)
(h : a = b → k () = true)
:
Equations
- withPtrEqUnsafe a b k h = if (ptrAddrUnsafe a == ptrAddrUnsafe b) = true then true else k ()
@[inline]
@[implementedBy withPtrAddrUnsafe]
noncomputable def
withPtrAddr
{α : Type u}
{β : Type v}
(a : α)
(k : USize → β)
(h : ∀ (u₁ u₂ : USize), k u₁ = k u₂)
:
β
Equations
- withPtrAddr a k h = k 0