Debugging helper functions #
Equations
- dbgTraceVal a = dbgTrace (toString a) fun (x : Unit) => a
Instances For
Print stack trace to stderr before evaluating given closure. Currently supported on Linux only.
Equations
- dbgStackTrace f = f ()
Instances For
Equations
- panicWithPos modName line col msg = panic (mkPanicMessage modName line col msg)
Instances For
Equations
- panicWithPosWithDecl modName declName line col msg = panic (mkPanicMessageWithDecl modName declName line col msg)
Instances For
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.
withPtrEq
for DecidableEq
Equations
- withPtrEqDecEq a b k = match h : withPtrEq a b (fun (x : Unit) => toBoolUsing (k ())) ⋯ with | true => isTrue ⋯ | false => isFalse ⋯
Instances For
Equations
- withPtrAddr a k h = k 0
Instances For
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
Instances For
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.