Unsafe. This function pretends the given action
is deterministic.
Unsafe. This function checks if two objects have the same address in the heap.
The results may vary on the backend or compiler optimizations but the function pretends to be totalstd/core/types/total: E
.
Note also that value types always compare unequal since each value will be boxed fresh in the heap
when calling this function.
Unsafe. This function calls a function and pretends it did not have any effect at all. Use with utmost care as it should not be used to dismiss user-defined effects that need a handler and can cause a segfault at runtime in such cases!
You can use unsafe-totalstd/core/unsafe/unsafe-total: forall<a,e> (action : () -> e a) -> a
to dismiss built-in effects without handlers which include:
divstd/core/types/div: X
(non-termination/divergence), ndetstd/core/types/ndet: X
(non-determinism)
allocstd/core/types/alloc: H -> X
, readstd/core/types/read: H -> X
, writestd/core/types/write: H -> X
, ststd/core/types/st: H -> E
ui
, fsys
, net
, blocking
io-total
and io-noexn
Do not dismiss io
since it has the exn
effect that should be handled (and an evidence
vector should be passed in).
Try to avoid using unsafe-totalstd/core/unsafe/unsafe-total: forall<a,e> (action : () -> e a) -> a
to initialize global values that have a side-effect, but
use delay
instead:
val myglobal = delay( fn() initialize() ) fun get-global() : e int myglobal.force val myglobal = delay( fn() initialize() ) fun get-global() : e intstd/core/types/int: V myglobal.force.
Unsafe primitives to dismiss effects.
.