Debugging helper functions #
Equations
- dbgTraceVal a = dbgTrace (toString a) fun x => a
Instances For
@[never_extract, extern lean_dbg_stack_trace]
Print stack trace to stderr before evaluating given closure. Currently supported on Linux only.
Equations
- dbgStackTrace f = f ()
Instances For
@[never_extract, inline]
def
panicWithPos
{α : Type u}
[Inhabited α]
(modName : String)
(line : Nat)
(col : Nat)
(msg : String)
:
α
Equations
- panicWithPos modName line col msg = panic (mkPanicMessage modName line col msg)
Instances For
@[never_extract, inline]
def
panicWithPosWithDecl
{α : Type u}
[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)
Instances For
@[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)
Instances For
@[inline]
withPtrEq
for DecidableEq
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implemented_by withPtrAddrUnsafe]
def
withPtrAddr
{α : Type u}
{β : Type v}
(a : α)
(k : USize → β)
(h : ∀ (u₁ u₂ : USize), k u₁ = k u₂)
:
β
Equations
- withPtrAddr a k h = k 0
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.