Debugging helper functions #
Equations
- dbgTraceVal a = dbgTrace (toString a) fun (x : Unit) => a
Print stack trace to stderr before evaluating given closure. Currently supported on Linux only.
Equations
- dbgStackTrace f = f ()
Equations
- panicWithPos modName line col msg = panic (mkPanicMessage modName line col msg)
Equations
- panicWithPosWithDecl modName declName line col msg = panic (mkPanicMessageWithDecl modName declName line col msg)
Equations
- withPtrAddrUnsafe a k h = k (ptrAddrUnsafe a)
Equations
- ptrEq a b = (ptrAddrUnsafe a == ptrAddrUnsafe b)
withPtrEq
for DecidableEq
Equations
- withPtrEqDecEq a b k = let b_1 := withPtrEq a b (fun (x : Unit) => toBoolUsing (k ())) ⋯; match h : b_1 with | true => isTrue ⋯ | false => isFalse ⋯
Equations
- withPtrAddr a k h = k 0
Marks given value and its object graph closure as multi-threaded if currently marked single-threaded. This will make reference counter updates atomic and thus more costly. It can still be useful to do eagerly when the value will be shared between threads later anyway and there is available time budget to mark it now.
Equations
Marks given value and its object graph closure as persistent. This will remove reference counter updates but prevent the closure from being deallocated until the end of the process! It can still be useful to do eagerly when the value will be marked persistent later anyway and there is available time budget to mark it now or it would be unnecessarily marked multi-threaded in between.