std/core/lazy▲toc

Internal functions to support lazy constructors

.

fun atomic-enter( ^target : a, lazy-tag : int32std/core/types/int32: V ) : boolstd/core/types/bool: V

Internal: atomically set a lazy value to locked (or return false if already memoized).

fun atomic-leave( target : a ) : ()

Internal: release an atomically memoized lazy value.

fun datatype-is-whnf( ^x : a, lazy-tag : int32std/core/types/int32: V ) : boolstd/core/types/bool: V

Internal: test if a lazy value is in whnf.

fun datatype-ptr-is-thread-shared( ^x : a ) : boolstd/core/types/bool: V

Internal: test if a heap allocated data type is thread-shared.

fun datatype-ptr-is-unique( ^x : a ) : boolstd/core/types/bool: V

Internal: test if a heap allocated data type is unique.

fun datatype-ptr-is-whnf( ^x : a, lazy-tag : int32std/core/types/int32: V ) : boolstd/core/types/bool: V

Internal: test if a heap allocated lazy value is in whnf.

fun indirect-compress( value : a, lazy-tag : int32std/core/types/int32: V ) : a

Internal: compress indirection chains.

fun memoize( target : a, x : a ) : a

Internal: explicitly force update-in-place for lazy values.

fun memoize-target( ^target : a, size : intstd/core/types/int: V, scan-size : intstd/core/types/int: V ) : ()

Internal: marker for lazy values that will be memoized (used to for correct reuse and reference counting).

private import std/core/typesstd/core/types