Function
withSTMRuntime
(
f: (runtime: STMDriver<unknown, unknown, unknown>) => STM.STM<A, E, R>
)
Source from the content-addressed store, hash-verified
| 711 | |
| 712 | /** @internal */ |
| 713 | export const withSTMRuntime = <A, E = never, R = never>( |
| 714 | f: (runtime: STMDriver<unknown, unknown, unknown>) => STM.STM<A, E, R> |
| 715 | ): STM.STM<A, E, R> => { |
| 716 | const stm = new STMPrimitive(OpCodes.OP_WITH_STM_RUNTIME) |
| 717 | stm.effect_instruction_i1 = f |
| 718 | return stm |
| 719 | } |
| 720 | |
| 721 | /** @internal */ |
| 722 | export const interrupt: STM.STM<never> = withSTMRuntime((_) => { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…