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 the address at which an object is allocated.
This function is unsafe because it can distinguish between definitionally equal values.
Returns true
if a
is an exclusive object.
An object is exclusive if it is single-threaded and its reference counter is 1. This function is unsafe because it can distinguish between definitionally equal values.
Equations
- withPtrAddrUnsafe a k h = k (ptrAddrUnsafe a)
Instances For
Compares two objects for pointer equality.
Two objects are pointer-equal if, at runtime, they are allocated at exactly the same address. This function is unsafe because it can distinguish between definitionally equal values.
Equations
- ptrEq a b = (ptrAddrUnsafe a == ptrAddrUnsafe b)
Instances For
Compares two lists of objects for element-wise pointer equality. Returns true
if both lists are
the same length and the objects at the corresponding indices of each list are pointer-equal.
Two objects are pointer-equal if, at runtime, they are allocated at exactly the same address. This function is unsafe because it can distinguish between definitionally equal values.
Equations
Instances For
Equations
- withPtrAddr a k h = k 0