Global store
We define a “global store”, which is a store (an associative array which is modifiable without a reference, as defined by NewStore()
) defined globally. It is accessible with GlobalStore()
, and we provide intrinsics to modify and query it directly.
This is mainly useful for debugging. Specifically it allows us to save values from within the Magma debugger, and retrieve them from the normal prompt.
GlobalStore ()
-> Any
The global store.
GlobalStoreClear ()
Clears the global store.
GlobalStoreGet (field :: MonStgElt)
-> Any
The value of the given field
in the global store.
GlobalStoreIsDefined (field :: MonStgElt)
-> BoolElt, Any
True if the field
is defined in the global store. If so, also returns the value.
GlobalStoreKeys ()
-> {}
The set of field names defined in the global store.
GlobalStoreRemove (field :: MonStgElt)
Removes the given field
from the global store.
GlobalStoreSet (field :: MonStgElt, value)
Sets the field
to the given value
in the global store.