Write to the store at the given index. If a store doesn't exist, creates one and resizes the store vector to fit. If there is already a store at the given index, deletes that store with deleteStore before replacing it.
Not thread-safe.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Moduleforeign-store-0.2.1Haskell2010
Store a stable pointer in a foreign context to be retrieved later. Persists through GHCi reloads. Not thread-safe.
Write to the store at the given index. If a store doesn't exist, creates one and resizes the store vector to fit. If there is already a store at the given index, deletes that store with deleteStore before replacing it.
Not thread-safe.
Allocates or finds an unallocated store. The index is random. The internal vector of stores grows in size. When stores are deleted the vector does not shrink, but old slots are re-used.
Not thread-safe.
Lookup from the store if an index is allocated.
Not thread-safe.
Read from the store. If the store has been deleted or is unallocated, this will throw an exception.
Not thread-safe.
Frees the stable pointer for GC and frees up the slot in the store. Deleting an already deleted store is a no-op. But remember that store numbers are re-used.
Not thread-safe.
Run the action and store the result.
Not thread-safe.
Run the action with the value in the store.
Not thread-safe.
An exception when working with stores.
Eq StoreExceptionDefined in foreign-store-0.2.1 · Foreign.StoreShow StoreExceptionDefined in foreign-store-0.2.1 · Foreign.StoreException StoreExceptionDefined in foreign-store-0.2.1 · Foreign.Store