Debugging helper functions #
Equations
- dbgTraceVal a = dbgTrace (toString a) fun (x : Unit) => a
Instances For
@[never_extract, extern lean_dbg_stack_trace]
Print stack trace to stderr before evaluating given closure. Currently supported on Linux only.
Instances For
@[never_extract, inline]
Equations
- panicWithPos modName line col msg = panic (mkPanicMessage✝ modName line col msg)
Instances For
@[extern lean_is_exclusive_obj]
Returns true
if a
is an exclusive object.
We say an object is exclusive if it is single-threaded and its reference counter is 1.
@[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