@fncts/io 0.0.11 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cached/api.d.ts +3 -4
- package/Channel/UpstreamPullStrategy/definition.d.ts +1 -1
- package/Channel/api/interruptWhen.d.ts +1 -1
- package/Channel/api/mapOutIOC.d.ts +2 -2
- package/Channel/api/mergeAll.d.ts +1 -1
- package/Channel/api/mergeAllUnboundedWith.d.ts +1 -1
- package/Channel/api/mergeAllWith.d.ts +3 -3
- package/Channel/api/mergeMap.d.ts +1 -1
- package/Channel/api/mergeWith.d.ts +3 -3
- package/Channel/api/runScoped.d.ts +1 -2
- package/Channel/api/toPull.d.ts +2 -3
- package/Channel/api/zipC.d.ts +3 -3
- package/Channel/api.d.ts +56 -57
- package/Channel/core-api.d.ts +12 -12
- package/Channel/definition.d.ts +36 -22
- package/Channel/internal/AsyncInputConsumer.d.ts +1 -1
- package/Channel/internal/AsyncInputProducer.d.ts +1 -1
- package/Channel/internal/ChannelExecutor.d.ts +5 -5
- package/Channel/internal/ChannelState.d.ts +1 -1
- package/Channel/internal/MergeDecision.d.ts +2 -2
- package/Channel/internal/MergeState.d.ts +2 -2
- package/Channel/internal/SingleProducerAsyncInput.d.ts +5 -5
- package/Clock/api.d.ts +3 -3
- package/Clock/definition.d.ts +2 -2
- package/Clock/live.d.ts +3 -3
- package/Console/api.d.ts +1 -1
- package/Fiber/FiberContext.d.ts +12 -12
- package/Fiber/api/await.d.ts +2 -2
- package/Fiber/api/awaitAll.d.ts +2 -2
- package/Fiber/api/children.d.ts +1 -1
- package/Fiber/api/collectAll.d.ts +3 -3
- package/Fiber/api/evalOn.d.ts +1 -1
- package/Fiber/api/evalOnIO.d.ts +1 -1
- package/Fiber/api/fromIO.d.ts +1 -1
- package/Fiber/api/id.d.ts +2 -2
- package/Fiber/api/inheritRefs.d.ts +1 -1
- package/Fiber/api/interrupt.d.ts +2 -2
- package/Fiber/api/interruptAll.d.ts +3 -3
- package/Fiber/api/interruptAs.d.ts +3 -3
- package/Fiber/api/join.d.ts +1 -1
- package/Fiber/api/joinAll.d.ts +1 -1
- package/Fiber/api/mapFiber.d.ts +1 -1
- package/Fiber/api/mapIO.d.ts +2 -2
- package/Fiber/api/poll.d.ts +3 -3
- package/Fiber/api/zipWith.d.ts +1 -1
- package/Fiber/constructors.d.ts +8 -8
- package/Fiber/definition.d.ts +4 -4
- package/FiberRef/api/locallyScoped.d.ts +1 -2
- package/FiberRef/api/locallyScopedWith.d.ts +1 -2
- package/FiberRef/api.d.ts +8 -8
- package/FiberRef/constructors.d.ts +2 -3
- package/FiberRef/unsafe.d.ts +11 -5
- package/FiberRefs/api.d.ts +4 -4
- package/FiberRefs/definition.d.ts +3 -3
- package/FiberRefs/join.d.ts +2 -2
- package/FiberScope/constructors.d.ts +1 -1
- package/FiberScope/definition.d.ts +1 -1
- package/FiberState/api.d.ts +1 -1
- package/FiberState/constructors.d.ts +3 -3
- package/FiberState/definition.d.ts +3 -3
- package/FiberStatus/constructors.d.ts +1 -1
- package/FiberStatus/definition.d.ts +1 -1
- package/Future/api.d.ts +18 -18
- package/Future/constructors.d.ts +3 -3
- package/Future/definition.d.ts +2 -2
- package/Hub/api.d.ts +22 -23
- package/Hub/definition.d.ts +6 -7
- package/Hub/internal.d.ts +1 -2
- package/IO/api/acquireRelease.d.ts +2 -3
- package/IO/api/acquireReleaseExit.d.ts +3 -4
- package/IO/api/acquireReleaseInterruptible.d.ts +2 -3
- package/IO/api/acquireReleaseInterruptibleExit.d.ts +3 -4
- package/IO/api/addFinalizer.d.ts +2 -3
- package/IO/api/addFinalizerExit.d.ts +2 -3
- package/IO/api/asyncIO.d.ts +1 -1
- package/IO/api/bracket.d.ts +2 -2
- package/IO/api/bracketExit.d.ts +3 -3
- package/IO/api/clockWith.d.ts +1 -1
- package/IO/api/concurrency.d.ts +4 -4
- package/IO/api/concurrentFinalizers.d.ts +1 -2
- package/IO/api/consoleWith.d.ts +2 -2
- package/IO/api/core-scope.d.ts +4 -4
- package/IO/api/ensuringChildren.d.ts +1 -1
- package/IO/api/environment.d.ts +10 -12
- package/IO/api/foreachC.d.ts +2 -2
- package/IO/api/foreachExec.d.ts +1 -1
- package/IO/api/forkScoped.d.ts +1 -2
- package/IO/api/fulfill.d.ts +1 -1
- package/IO/api/interrupt.d.ts +8 -8
- package/IO/api/onExit.d.ts +2 -2
- package/IO/api/onTermination.d.ts +4 -4
- package/IO/api/provideLayer.d.ts +1 -1
- package/IO/api/provideSomeLayer.d.ts +1 -1
- package/IO/api/race.d.ts +1 -1
- package/IO/api/raceFirst.d.ts +1 -1
- package/IO/api/randomWith.d.ts +2 -2
- package/IO/api/repeat.d.ts +6 -6
- package/IO/api/retry.d.ts +5 -5
- package/IO/api/schedule.d.ts +3 -3
- package/IO/api/scope.d.ts +1 -2
- package/IO/api/scopeWith.d.ts +1 -2
- package/IO/api/scoped.d.ts +3 -4
- package/IO/api/sequenceT.d.ts +4 -4
- package/IO/api/sleep.d.ts +2 -2
- package/IO/api/stateful.d.ts +3 -4
- package/IO/api/timeout.d.ts +4 -4
- package/IO/api/withEarlyRelease.d.ts +1 -2
- package/IO/api/withFinalizer.d.ts +1 -2
- package/IO/api/withFinalizerExit.d.ts +2 -3
- package/IO/api/withRuntimeConfig.d.ts +2 -2
- package/IO/api/zipC.d.ts +4 -4
- package/IO/api.d.ts +94 -94
- package/IO/definition.d.ts +44 -34
- package/IO/runtime.d.ts +29 -16
- package/IOEnv/definition.d.ts +2 -3
- package/IOEnv/live.d.ts +1 -1
- package/IOEnv/services.d.ts +1 -1
- package/IOSpec.d.ts +7 -8
- package/Layer/MemoMap.d.ts +8 -9
- package/Layer/api.d.ts +41 -43
- package/Layer/definition.d.ts +22 -16
- package/Logger/api.d.ts +2 -2
- package/Logger/definition.d.ts +4 -4
- package/Queue/api/dimapIO.d.ts +6 -6
- package/Queue/api/filterInputIO.d.ts +6 -6
- package/Queue/api/filterOutputIO.d.ts +8 -8
- package/Queue/api/operations.d.ts +10 -10
- package/Queue/api/poll.d.ts +2 -2
- package/Queue/api/takeBetween.d.ts +1 -1
- package/Queue/api/zipWithIO.d.ts +9 -9
- package/Queue/constructors.d.ts +4 -4
- package/Queue/definition.d.ts +10 -10
- package/Queue/internal.d.ts +1 -1
- package/Queue/strategy.d.ts +10 -10
- package/Random/api.d.ts +8 -8
- package/Random/definition.d.ts +5 -5
- package/Random/live.d.ts +5 -5
- package/Ref/Atomic/Atomic.d.ts +4 -4
- package/Ref/Atomic/api.d.ts +11 -11
- package/Ref/Derived.d.ts +4 -4
- package/Ref/DerivedAll.d.ts +4 -4
- package/Ref/Synchronized/api.d.ts +16 -16
- package/Ref/Synchronized/constructors.d.ts +2 -2
- package/Ref/Synchronized/definition.d.ts +3 -3
- package/Ref/api/collect.d.ts +2 -2
- package/Ref/api/dimap.d.ts +8 -8
- package/Ref/api/filter.d.ts +3 -3
- package/Ref/api/get.d.ts +1 -1
- package/Ref/api/match.d.ts +1 -1
- package/Ref/api/matchAll.d.ts +1 -1
- package/Ref/api/modify.d.ts +10 -10
- package/Ref/api/set.d.ts +1 -1
- package/Ref/constructors.d.ts +3 -3
- package/Ref/definition.d.ts +15 -15
- package/RuntimeConfig.d.ts +2 -2
- package/STM/api/core-api.d.ts +5 -5
- package/STM/api/core-constructors.d.ts +9 -9
- package/STM/api.d.ts +60 -72
- package/STM/definition.d.ts +10 -9
- package/STM/driver.d.ts +2 -2
- package/STM/internal/CommitState.d.ts +1 -1
- package/STM/internal/Journal.d.ts +7 -6
- package/STM/internal/TryCommit.d.ts +1 -1
- package/Schedule/Decision.d.ts +10 -4
- package/Schedule/Driver.d.ts +4 -4
- package/Schedule/api/driver.d.ts +1 -1
- package/Schedule/api.d.ts +85 -73
- package/Schedule/definition.d.ts +1 -1
- package/Scope/Finalizer/definition.d.ts +3 -3
- package/Scope/ReleaseMap/api/releaseAll.d.ts +2 -2
- package/Scope/ReleaseMap/api.d.ts +7 -7
- package/Scope/ReleaseMap/definition.d.ts +3 -3
- package/Scope/api.d.ts +9 -10
- package/Scope/definition.d.ts +2 -2
- package/ScopedRef/api.d.ts +2 -3
- package/ScopedRef/definition.d.ts +1 -2
- package/Sink/api.d.ts +73 -74
- package/State/api.d.ts +2 -3
- package/Stream/api/zipAllWith.d.ts +3 -3
- package/Stream/api/zipWith.d.ts +1 -1
- package/Stream/api/zipWithChunks.d.ts +4 -4
- package/Stream/api.d.ts +171 -166
- package/Stream/definition.d.ts +3 -3
- package/Stream/internal/Handoff.d.ts +2 -2
- package/Stream/internal/Pull.d.ts +2 -2
- package/Stream/internal/Take.d.ts +4 -4
- package/Stream/internal/util.d.ts +1 -1
- package/Supervisor/api.d.ts +3 -3
- package/Supervisor/constructors.d.ts +6 -6
- package/Supervisor/definition.d.ts +3 -3
- package/TExit/constructors.d.ts +1 -1
- package/TExit/definition.d.ts +1 -1
- package/TFuture/api.d.ts +7 -7
- package/TFuture/constructors.d.ts +4 -4
- package/TFuture/definition.d.ts +3 -3
- package/TReentrantLock/api.d.ts +18 -19
- package/TReentrantLock/definition.d.ts +2 -2
- package/TRef/api.d.ts +15 -15
- package/TRef/constructors.d.ts +5 -5
- package/TRef/definition.d.ts +2 -2
- package/TSemaphore/api.d.ts +7 -7
- package/TSemaphore/constructors.d.ts +1 -1
- package/TSemaphore/definition.d.ts +1 -1
- package/_cjs/Cached/api.cjs +5 -5
- package/_cjs/Cached/api.cjs.map +1 -1
- package/_cjs/Channel/api/interruptWhen.cjs +1 -1
- package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
- package/_cjs/Channel/api/mapOutIOC.cjs +2 -2
- package/_cjs/Channel/api/mapOutIOC.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +11 -11
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +5 -5
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api/run.cjs +3 -1
- package/_cjs/Channel/api/run.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +7 -7
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/core-api.cjs.map +1 -1
- package/_cjs/Channel/definition.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +6 -6
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelState.cjs +2 -1
- package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +16 -16
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Clock/live.cjs.map +1 -1
- package/_cjs/Console/api.cjs +5 -3
- package/_cjs/Console/api.cjs.map +1 -1
- package/_cjs/Fiber/FiberContext.cjs +8 -10
- package/_cjs/Fiber/FiberContext.cjs.map +1 -1
- package/_cjs/Fiber/api/await.cjs +1 -1
- package/_cjs/Fiber/api/await.cjs.map +1 -1
- package/_cjs/Fiber/api/awaitAll.cjs +2 -4
- package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
- package/_cjs/Fiber/api/children.cjs +1 -1
- package/_cjs/Fiber/api/children.cjs.map +1 -1
- package/_cjs/Fiber/api/collectAll.cjs +2 -4
- package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
- package/_cjs/Fiber/api/evalOn.cjs +1 -1
- package/_cjs/Fiber/api/evalOn.cjs.map +1 -1
- package/_cjs/Fiber/api/evalOnIO.cjs +2 -4
- package/_cjs/Fiber/api/evalOnIO.cjs.map +1 -1
- package/_cjs/Fiber/api/fromIO.cjs +2 -4
- package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
- package/_cjs/Fiber/api/id.cjs +1 -1
- package/_cjs/Fiber/api/id.cjs.map +1 -1
- package/_cjs/Fiber/api/inheritRefs.cjs +1 -1
- package/_cjs/Fiber/api/inheritRefs.cjs.map +1 -1
- package/_cjs/Fiber/api/interrupt.cjs +2 -4
- package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAll.cjs +4 -5
- package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAs.cjs +1 -1
- package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptFork.cjs +1 -1
- package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
- package/_cjs/Fiber/api/join.cjs +2 -4
- package/_cjs/Fiber/api/join.cjs.map +1 -1
- package/_cjs/Fiber/api/joinAll.cjs +2 -4
- package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
- package/_cjs/Fiber/api/mapFiber.cjs +2 -4
- package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
- package/_cjs/Fiber/api/mapIO.cjs +4 -5
- package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
- package/_cjs/Fiber/api/poll.cjs +1 -1
- package/_cjs/Fiber/api/poll.cjs.map +1 -1
- package/_cjs/Fiber/api/zipWith.cjs +2 -4
- package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
- package/_cjs/Fiber/constructors.cjs +10 -11
- package/_cjs/Fiber/constructors.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScoped.cjs +2 -4
- package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScopedWith.cjs +2 -4
- package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
- package/_cjs/FiberRef/api.cjs +13 -14
- package/_cjs/FiberRef/api.cjs.map +1 -1
- package/_cjs/FiberRef/constructors.cjs +4 -6
- package/_cjs/FiberRef/constructors.cjs.map +1 -1
- package/_cjs/FiberRef/unsafe.cjs +9 -1
- package/_cjs/FiberRef/unsafe.cjs.map +1 -1
- package/_cjs/Future/api.cjs +30 -31
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Future/constructors.cjs +4 -5
- package/_cjs/Future/constructors.cjs.map +1 -1
- package/_cjs/Hub/api.cjs +44 -44
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +16 -24
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/acquireRelease.cjs +2 -4
- package/_cjs/IO/api/acquireRelease.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseExit.cjs +1 -1
- package/_cjs/IO/api/acquireReleaseExit.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizer.cjs +1 -1
- package/_cjs/IO/api/addFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizerExit.cjs +5 -11
- package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/asyncIO.cjs +5 -7
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/bracket.cjs +2 -2
- package/_cjs/IO/api/bracket.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +2 -4
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/concurrency.cjs +7 -7
- package/_cjs/IO/api/concurrency.cjs.map +1 -1
- package/_cjs/IO/api/concurrentFinalizers.cjs +2 -4
- package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
- package/_cjs/IO/api/consoleWith.cjs +3 -3
- package/_cjs/IO/api/consoleWith.cjs.map +1 -1
- package/_cjs/IO/api/core-scope.cjs +4 -4
- package/_cjs/IO/api/core-scope.cjs.map +1 -1
- package/_cjs/IO/api/ensuringChildren.cjs +2 -4
- package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
- package/_cjs/IO/api/environment.cjs +6 -8
- package/_cjs/IO/api/environment.cjs.map +1 -1
- package/_cjs/IO/api/foreachC.cjs +25 -27
- package/_cjs/IO/api/foreachC.cjs.map +1 -1
- package/_cjs/IO/api/foreachExec.cjs +2 -4
- package/_cjs/IO/api/foreachExec.cjs.map +1 -1
- package/_cjs/IO/api/forkIn.cjs +1 -1
- package/_cjs/IO/api/forkIn.cjs.map +1 -1
- package/_cjs/IO/api/forkScoped.cjs +1 -1
- package/_cjs/IO/api/forkScoped.cjs.map +1 -1
- package/_cjs/IO/api/fulfill.cjs +2 -4
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +13 -13
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/memoize.cjs +4 -8
- package/_cjs/IO/api/memoize.cjs.map +1 -1
- package/_cjs/IO/api/onExit.cjs +2 -2
- package/_cjs/IO/api/onExit.cjs.map +1 -1
- package/_cjs/IO/api/onTermination.cjs +2 -2
- package/_cjs/IO/api/onTermination.cjs.map +1 -1
- package/_cjs/IO/api/once.cjs +1 -1
- package/_cjs/IO/api/once.cjs.map +1 -1
- package/_cjs/IO/api/provideLayer.cjs +2 -4
- package/_cjs/IO/api/provideLayer.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeLayer.cjs +2 -3
- package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
- package/_cjs/IO/api/race.cjs +4 -6
- package/_cjs/IO/api/race.cjs.map +1 -1
- package/_cjs/IO/api/raceFirst.cjs +2 -4
- package/_cjs/IO/api/raceFirst.cjs.map +1 -1
- package/_cjs/IO/api/randomWith.cjs +3 -3
- package/_cjs/IO/api/randomWith.cjs.map +1 -1
- package/_cjs/IO/api/repeat.cjs +10 -11
- package/_cjs/IO/api/repeat.cjs.map +1 -1
- package/_cjs/IO/api/retry.cjs +8 -9
- package/_cjs/IO/api/retry.cjs.map +1 -1
- package/_cjs/IO/api/schedule.cjs +6 -7
- package/_cjs/IO/api/schedule.cjs.map +1 -1
- package/_cjs/IO/api/scope.cjs +1 -1
- package/_cjs/IO/api/scope.cjs.map +1 -1
- package/_cjs/IO/api/scopeWith.cjs +2 -4
- package/_cjs/IO/api/scopeWith.cjs.map +1 -1
- package/_cjs/IO/api/scoped.cjs +4 -5
- package/_cjs/IO/api/scoped.cjs.map +1 -1
- package/_cjs/IO/api/stateful.cjs +1 -1
- package/_cjs/IO/api/stateful.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +3 -4
- package/_cjs/IO/api/timeout.cjs.map +1 -1
- package/_cjs/IO/api/withChildren.cjs +1 -1
- package/_cjs/IO/api/withChildren.cjs.map +1 -1
- package/_cjs/IO/api/withEarlyRelease.cjs +2 -4
- package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizer.cjs +2 -2
- package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizerExit.cjs +2 -4
- package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/withRuntimeConfig.cjs +2 -4
- package/_cjs/IO/api/withRuntimeConfig.cjs.map +1 -1
- package/_cjs/IO/api/zipC.cjs +5 -6
- package/_cjs/IO/api/zipC.cjs.map +1 -1
- package/_cjs/IO/api.cjs +112 -112
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +5 -8
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +69 -21
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/IOEnv/live.cjs +3 -1
- package/_cjs/IOEnv/live.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +45 -62
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +84 -83
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Layer/definition.cjs +14 -7
- package/_cjs/Layer/definition.cjs.map +1 -1
- package/_cjs/Queue/api/dimapIO.cjs +14 -14
- package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +6 -6
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +6 -6
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Queue/api/operations.cjs +13 -13
- package/_cjs/Queue/api/operations.cjs.map +1 -1
- package/_cjs/Queue/api/poll.cjs +2 -4
- package/_cjs/Queue/api/poll.cjs.map +1 -1
- package/_cjs/Queue/api/takeBetween.cjs +10 -12
- package/_cjs/Queue/api/takeBetween.cjs.map +1 -1
- package/_cjs/Queue/api/zipWithIO.cjs +12 -12
- package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
- package/_cjs/Queue/constructors.cjs +8 -10
- package/_cjs/Queue/constructors.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +17 -17
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Queue/strategy.cjs +16 -20
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Random/api.cjs +15 -13
- package/_cjs/Random/api.cjs.map +1 -1
- package/_cjs/Random/live.cjs +4 -4
- package/_cjs/Random/live.cjs.map +1 -1
- package/_cjs/Ref/Atomic/Atomic.cjs.map +1 -1
- package/_cjs/Ref/Atomic/api.cjs +19 -21
- package/_cjs/Ref/Atomic/api.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs +1 -1
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/api.cjs +25 -26
- package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/constructors.cjs +8 -14
- package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/definition.cjs +1 -1
- package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
- package/_cjs/Ref/api/collect.cjs +1 -1
- package/_cjs/Ref/api/collect.cjs.map +1 -1
- package/_cjs/Ref/api/dimap.cjs +12 -12
- package/_cjs/Ref/api/dimap.cjs.map +1 -1
- package/_cjs/Ref/api/filter.cjs +2 -2
- package/_cjs/Ref/api/filter.cjs.map +1 -1
- package/_cjs/Ref/api/get.cjs +1 -1
- package/_cjs/Ref/api/get.cjs.map +1 -1
- package/_cjs/Ref/api/modify.cjs +29 -30
- package/_cjs/Ref/api/modify.cjs.map +1 -1
- package/_cjs/Ref/api/set.cjs +1 -1
- package/_cjs/Ref/api/set.cjs.map +1 -1
- package/_cjs/Ref/constructors.cjs +3 -4
- package/_cjs/Ref/constructors.cjs.map +1 -1
- package/_cjs/STM/api/core-api.cjs +8 -8
- package/_cjs/STM/api/core-api.cjs.map +1 -1
- package/_cjs/STM/api/core-constructors.cjs +6 -6
- package/_cjs/STM/api/core-constructors.cjs.map +1 -1
- package/_cjs/STM/api.cjs +129 -148
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +10 -6
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/Journal.cjs +20 -22
- package/_cjs/STM/internal/Journal.cjs.map +1 -1
- package/_cjs/Schedule/Decision.cjs +17 -0
- package/_cjs/Schedule/Decision.cjs.map +1 -1
- package/_cjs/Schedule/api/driver.cjs +18 -21
- package/_cjs/Schedule/api/driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +205 -180
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Scope/Finalizer/definition.cjs +4 -6
- package/_cjs/Scope/Finalizer/definition.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +3 -5
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api.cjs +14 -15
- package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/constructors.cjs +1 -1
- package/_cjs/Scope/ReleaseMap/constructors.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/definition.cjs +2 -4
- package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
- package/_cjs/Scope/api.cjs +20 -30
- package/_cjs/Scope/api.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +14 -22
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +92 -88
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/State/api.cjs +5 -7
- package/_cjs/State/api.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +22 -24
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWith.cjs +2 -2
- package/_cjs/Stream/api/zipWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +20 -22
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +436 -419
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +12 -12
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/Pull.cjs +1 -1
- package/_cjs/Stream/internal/Pull.cjs.map +1 -1
- package/_cjs/Stream/internal/Take.cjs +1 -1
- package/_cjs/Stream/internal/Take.cjs.map +1 -1
- package/_cjs/Supervisor/api.cjs +3 -1
- package/_cjs/Supervisor/api.cjs.map +1 -1
- package/_cjs/Supervisor/constructors.cjs +14 -8
- package/_cjs/Supervisor/constructors.cjs.map +1 -1
- package/_cjs/TFuture/api.cjs +10 -10
- package/_cjs/TFuture/api.cjs.map +1 -1
- package/_cjs/TFuture/constructors.cjs +4 -4
- package/_cjs/TFuture/constructors.cjs.map +1 -1
- package/_cjs/TFuture/definition.cjs +2 -4
- package/_cjs/TFuture/definition.cjs.map +1 -1
- package/_cjs/TReentrantLock/api.cjs +41 -42
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TRef/api.cjs +40 -40
- package/_cjs/TRef/api.cjs.map +1 -1
- package/_cjs/TRef/constructors.cjs +6 -6
- package/_cjs/TRef/constructors.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +20 -21
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/TSemaphore/constructors.cjs +2 -2
- package/_cjs/TSemaphore/constructors.cjs.map +1 -1
- package/_cjs/TSemaphore/definition.cjs +2 -4
- package/_cjs/TSemaphore/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +1 -1
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/filterIO.cjs +5 -7
- package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/findIO.cjs +7 -9
- package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/mapIO.cjs +3 -5
- package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +7 -9
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc.cjs +26 -0
- package/_cjs/collection/immutable/Conc.cjs.map +1 -1
- package/_cjs/data/Exit/foreachIO.cjs +2 -4
- package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
- package/_cjs/global.cjs +6 -0
- package/_cjs/global.cjs.map +1 -0
- package/_cjs/index.cjs +6 -0
- package/_cjs/index.cjs.map +1 -0
- package/_cjs/internal/Scheduler.cjs +64 -14
- package/_cjs/internal/Scheduler.cjs.map +1 -1
- package/_mjs/Cached/api.mjs +5 -5
- package/_mjs/Cached/api.mjs.map +1 -1
- package/_mjs/Channel/api/interruptWhen.mjs +1 -1
- package/_mjs/Channel/api/interruptWhen.mjs.map +1 -1
- package/_mjs/Channel/api/mapOutIOC.mjs +2 -2
- package/_mjs/Channel/api/mapOutIOC.mjs.map +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +11 -11
- package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
- package/_mjs/Channel/api/mergeWith.mjs +6 -5
- package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
- package/_mjs/Channel/api/run.mjs +2 -1
- package/_mjs/Channel/api/run.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +7 -7
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/core-api.mjs.map +1 -1
- package/_mjs/Channel/definition.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +6 -6
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelState.mjs +2 -1
- package/_mjs/Channel/internal/ChannelState.mjs.map +1 -1
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +16 -16
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
- package/_mjs/Clock/live.mjs.map +1 -1
- package/_mjs/Console/api.mjs +4 -3
- package/_mjs/Console/api.mjs.map +1 -1
- package/_mjs/Fiber/FiberContext.mjs +9 -9
- package/_mjs/Fiber/FiberContext.mjs.map +1 -1
- package/_mjs/Fiber/api/await.mjs +1 -1
- package/_mjs/Fiber/api/await.mjs.map +1 -1
- package/_mjs/Fiber/api/awaitAll.mjs +2 -3
- package/_mjs/Fiber/api/awaitAll.mjs.map +1 -1
- package/_mjs/Fiber/api/children.mjs +1 -1
- package/_mjs/Fiber/api/children.mjs.map +1 -1
- package/_mjs/Fiber/api/collectAll.mjs +2 -3
- package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
- package/_mjs/Fiber/api/evalOn.mjs +1 -1
- package/_mjs/Fiber/api/evalOn.mjs.map +1 -1
- package/_mjs/Fiber/api/evalOnIO.mjs +2 -3
- package/_mjs/Fiber/api/evalOnIO.mjs.map +1 -1
- package/_mjs/Fiber/api/fromIO.mjs +2 -3
- package/_mjs/Fiber/api/fromIO.mjs.map +1 -1
- package/_mjs/Fiber/api/id.mjs +1 -1
- package/_mjs/Fiber/api/id.mjs.map +1 -1
- package/_mjs/Fiber/api/inheritRefs.mjs +1 -1
- package/_mjs/Fiber/api/inheritRefs.mjs.map +1 -1
- package/_mjs/Fiber/api/interrupt.mjs +2 -3
- package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs +4 -5
- package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAs.mjs +1 -1
- package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
- package/_mjs/Fiber/api/join.mjs +2 -3
- package/_mjs/Fiber/api/join.mjs.map +1 -1
- package/_mjs/Fiber/api/joinAll.mjs +2 -3
- package/_mjs/Fiber/api/joinAll.mjs.map +1 -1
- package/_mjs/Fiber/api/mapFiber.mjs +2 -3
- package/_mjs/Fiber/api/mapFiber.mjs.map +1 -1
- package/_mjs/Fiber/api/mapIO.mjs +4 -5
- package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
- package/_mjs/Fiber/api/poll.mjs +1 -1
- package/_mjs/Fiber/api/poll.mjs.map +1 -1
- package/_mjs/Fiber/api/zipWith.mjs +2 -3
- package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
- package/_mjs/Fiber/constructors.mjs +10 -11
- package/_mjs/Fiber/constructors.mjs.map +1 -1
- package/_mjs/FiberRef/api/locallyScoped.mjs +2 -3
- package/_mjs/FiberRef/api/locallyScoped.mjs.map +1 -1
- package/_mjs/FiberRef/api/locallyScopedWith.mjs +2 -3
- package/_mjs/FiberRef/api/locallyScopedWith.mjs.map +1 -1
- package/_mjs/FiberRef/api.mjs +13 -14
- package/_mjs/FiberRef/api.mjs.map +1 -1
- package/_mjs/FiberRef/constructors.mjs +4 -5
- package/_mjs/FiberRef/constructors.mjs.map +1 -1
- package/_mjs/FiberRef/unsafe.mjs +6 -0
- package/_mjs/FiberRef/unsafe.mjs.map +1 -1
- package/_mjs/Future/api.mjs +30 -31
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Future/constructors.mjs +4 -5
- package/_mjs/Future/constructors.mjs.map +1 -1
- package/_mjs/Hub/api.mjs +44 -44
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/Hub/internal.mjs +16 -24
- package/_mjs/Hub/internal.mjs.map +1 -1
- package/_mjs/IO/api/acquireRelease.mjs +2 -3
- package/_mjs/IO/api/acquireRelease.mjs.map +1 -1
- package/_mjs/IO/api/acquireReleaseExit.mjs +1 -1
- package/_mjs/IO/api/acquireReleaseExit.mjs.map +1 -1
- package/_mjs/IO/api/acquireReleaseInterruptibleExit.mjs +1 -1
- package/_mjs/IO/api/acquireReleaseInterruptibleExit.mjs.map +1 -1
- package/_mjs/IO/api/addFinalizer.mjs +1 -1
- package/_mjs/IO/api/addFinalizer.mjs.map +1 -1
- package/_mjs/IO/api/addFinalizerExit.mjs +5 -10
- package/_mjs/IO/api/addFinalizerExit.mjs.map +1 -1
- package/_mjs/IO/api/asyncIO.mjs +5 -6
- package/_mjs/IO/api/asyncIO.mjs.map +1 -1
- package/_mjs/IO/api/bracket.mjs +2 -2
- package/_mjs/IO/api/bracket.mjs.map +1 -1
- package/_mjs/IO/api/bracketExit.mjs +2 -3
- package/_mjs/IO/api/bracketExit.mjs.map +1 -1
- package/_mjs/IO/api/concurrency.mjs +7 -7
- package/_mjs/IO/api/concurrency.mjs.map +1 -1
- package/_mjs/IO/api/concurrentFinalizers.mjs +2 -3
- package/_mjs/IO/api/concurrentFinalizers.mjs.map +1 -1
- package/_mjs/IO/api/consoleWith.mjs +3 -3
- package/_mjs/IO/api/consoleWith.mjs.map +1 -1
- package/_mjs/IO/api/core-scope.mjs +4 -4
- package/_mjs/IO/api/core-scope.mjs.map +1 -1
- package/_mjs/IO/api/ensuringChildren.mjs +2 -3
- package/_mjs/IO/api/ensuringChildren.mjs.map +1 -1
- package/_mjs/IO/api/environment.mjs +6 -8
- package/_mjs/IO/api/environment.mjs.map +1 -1
- package/_mjs/IO/api/foreachC.mjs +25 -26
- package/_mjs/IO/api/foreachC.mjs.map +1 -1
- package/_mjs/IO/api/foreachExec.mjs +2 -3
- package/_mjs/IO/api/foreachExec.mjs.map +1 -1
- package/_mjs/IO/api/forkIn.mjs +1 -1
- package/_mjs/IO/api/forkIn.mjs.map +1 -1
- package/_mjs/IO/api/forkScoped.mjs +1 -1
- package/_mjs/IO/api/forkScoped.mjs.map +1 -1
- package/_mjs/IO/api/fulfill.mjs +2 -3
- package/_mjs/IO/api/fulfill.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +13 -13
- package/_mjs/IO/api/interrupt.mjs.map +1 -1
- package/_mjs/IO/api/memoize.mjs +4 -8
- package/_mjs/IO/api/memoize.mjs.map +1 -1
- package/_mjs/IO/api/onExit.mjs +2 -2
- package/_mjs/IO/api/onExit.mjs.map +1 -1
- package/_mjs/IO/api/onTermination.mjs +2 -2
- package/_mjs/IO/api/onTermination.mjs.map +1 -1
- package/_mjs/IO/api/once.mjs +1 -1
- package/_mjs/IO/api/once.mjs.map +1 -1
- package/_mjs/IO/api/provideLayer.mjs +2 -3
- package/_mjs/IO/api/provideLayer.mjs.map +1 -1
- package/_mjs/IO/api/provideSomeLayer.mjs +2 -3
- package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
- package/_mjs/IO/api/race.mjs +4 -5
- package/_mjs/IO/api/race.mjs.map +1 -1
- package/_mjs/IO/api/raceFirst.mjs +2 -3
- package/_mjs/IO/api/raceFirst.mjs.map +1 -1
- package/_mjs/IO/api/randomWith.mjs +3 -3
- package/_mjs/IO/api/randomWith.mjs.map +1 -1
- package/_mjs/IO/api/repeat.mjs +10 -11
- package/_mjs/IO/api/repeat.mjs.map +1 -1
- package/_mjs/IO/api/retry.mjs +8 -9
- package/_mjs/IO/api/retry.mjs.map +1 -1
- package/_mjs/IO/api/schedule.mjs +6 -7
- package/_mjs/IO/api/schedule.mjs.map +1 -1
- package/_mjs/IO/api/scope.mjs +1 -1
- package/_mjs/IO/api/scope.mjs.map +1 -1
- package/_mjs/IO/api/scopeWith.mjs +2 -3
- package/_mjs/IO/api/scopeWith.mjs.map +1 -1
- package/_mjs/IO/api/scoped.mjs +4 -5
- package/_mjs/IO/api/scoped.mjs.map +1 -1
- package/_mjs/IO/api/stateful.mjs +1 -1
- package/_mjs/IO/api/stateful.mjs.map +1 -1
- package/_mjs/IO/api/timeout.mjs +3 -4
- package/_mjs/IO/api/timeout.mjs.map +1 -1
- package/_mjs/IO/api/withChildren.mjs +1 -1
- package/_mjs/IO/api/withChildren.mjs.map +1 -1
- package/_mjs/IO/api/withEarlyRelease.mjs +2 -3
- package/_mjs/IO/api/withEarlyRelease.mjs.map +1 -1
- package/_mjs/IO/api/withFinalizer.mjs +2 -2
- package/_mjs/IO/api/withFinalizer.mjs.map +1 -1
- package/_mjs/IO/api/withFinalizerExit.mjs +2 -3
- package/_mjs/IO/api/withFinalizerExit.mjs.map +1 -1
- package/_mjs/IO/api/withRuntimeConfig.mjs +2 -3
- package/_mjs/IO/api/withRuntimeConfig.mjs.map +1 -1
- package/_mjs/IO/api/zipC.mjs +5 -6
- package/_mjs/IO/api/zipC.mjs.map +1 -1
- package/_mjs/IO/api.mjs +112 -112
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +3 -5
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +61 -18
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/IOEnv/live.mjs +2 -1
- package/_mjs/IOEnv/live.mjs.map +1 -1
- package/_mjs/Layer/MemoMap.mjs +43 -60
- package/_mjs/Layer/MemoMap.mjs.map +1 -1
- package/_mjs/Layer/api.mjs +84 -84
- package/_mjs/Layer/api.mjs.map +1 -1
- package/_mjs/Layer/definition.mjs +14 -7
- package/_mjs/Layer/definition.mjs.map +1 -1
- package/_mjs/Queue/api/dimapIO.mjs +14 -14
- package/_mjs/Queue/api/dimapIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterInputIO.mjs +6 -6
- package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterOutputIO.mjs +6 -6
- package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
- package/_mjs/Queue/api/operations.mjs +13 -13
- package/_mjs/Queue/api/operations.mjs.map +1 -1
- package/_mjs/Queue/api/poll.mjs +2 -3
- package/_mjs/Queue/api/poll.mjs.map +1 -1
- package/_mjs/Queue/api/takeBetween.mjs +10 -11
- package/_mjs/Queue/api/takeBetween.mjs.map +1 -1
- package/_mjs/Queue/api/zipWithIO.mjs +12 -12
- package/_mjs/Queue/api/zipWithIO.mjs.map +1 -1
- package/_mjs/Queue/constructors.mjs +8 -9
- package/_mjs/Queue/constructors.mjs.map +1 -1
- package/_mjs/Queue/internal.mjs +17 -17
- package/_mjs/Queue/internal.mjs.map +1 -1
- package/_mjs/Queue/strategy.mjs +16 -20
- package/_mjs/Queue/strategy.mjs.map +1 -1
- package/_mjs/Random/api.mjs +14 -13
- package/_mjs/Random/api.mjs.map +1 -1
- package/_mjs/Random/live.mjs +4 -4
- package/_mjs/Random/live.mjs.map +1 -1
- package/_mjs/Ref/Atomic/Atomic.mjs.map +1 -1
- package/_mjs/Ref/Atomic/api.mjs +19 -20
- package/_mjs/Ref/Atomic/api.mjs.map +1 -1
- package/_mjs/Ref/Derived.mjs.map +1 -1
- package/_mjs/Ref/DerivedAll.mjs +1 -1
- package/_mjs/Ref/DerivedAll.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/api.mjs +25 -26
- package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/constructors.mjs +8 -13
- package/_mjs/Ref/Synchronized/constructors.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
- package/_mjs/Ref/api/collect.mjs +1 -1
- package/_mjs/Ref/api/collect.mjs.map +1 -1
- package/_mjs/Ref/api/dimap.mjs +12 -12
- package/_mjs/Ref/api/dimap.mjs.map +1 -1
- package/_mjs/Ref/api/filter.mjs +2 -2
- package/_mjs/Ref/api/filter.mjs.map +1 -1
- package/_mjs/Ref/api/get.mjs +1 -1
- package/_mjs/Ref/api/get.mjs.map +1 -1
- package/_mjs/Ref/api/modify.mjs +29 -30
- package/_mjs/Ref/api/modify.mjs.map +1 -1
- package/_mjs/Ref/api/set.mjs +1 -1
- package/_mjs/Ref/api/set.mjs.map +1 -1
- package/_mjs/Ref/constructors.mjs +3 -4
- package/_mjs/Ref/constructors.mjs.map +1 -1
- package/_mjs/STM/api/core-api.mjs +8 -8
- package/_mjs/STM/api/core-api.mjs.map +1 -1
- package/_mjs/STM/api/core-constructors.mjs +6 -6
- package/_mjs/STM/api/core-constructors.mjs.map +1 -1
- package/_mjs/STM/api.mjs +122 -142
- package/_mjs/STM/api.mjs.map +1 -1
- package/_mjs/STM/definition.mjs.map +1 -1
- package/_mjs/STM/driver.mjs +9 -6
- package/_mjs/STM/driver.mjs.map +1 -1
- package/_mjs/STM/internal/Journal.mjs +20 -21
- package/_mjs/STM/internal/Journal.mjs.map +1 -1
- package/_mjs/Schedule/Decision.mjs +9 -0
- package/_mjs/Schedule/Decision.mjs.map +1 -1
- package/_mjs/Schedule/api/driver.mjs +17 -20
- package/_mjs/Schedule/api/driver.mjs.map +1 -1
- package/_mjs/Schedule/api.mjs +198 -177
- package/_mjs/Schedule/api.mjs.map +1 -1
- package/_mjs/Scope/Finalizer/definition.mjs +4 -5
- package/_mjs/Scope/Finalizer/definition.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs +3 -4
- package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/api.mjs +14 -15
- package/_mjs/Scope/ReleaseMap/api.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/constructors.mjs +1 -1
- package/_mjs/Scope/ReleaseMap/constructors.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/definition.mjs +2 -3
- package/_mjs/Scope/ReleaseMap/definition.mjs.map +1 -1
- package/_mjs/Scope/api.mjs +20 -30
- package/_mjs/Scope/api.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +14 -22
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/Sink/api.mjs +92 -88
- package/_mjs/Sink/api.mjs.map +1 -1
- package/_mjs/State/api.mjs +5 -6
- package/_mjs/State/api.mjs.map +1 -1
- package/_mjs/Stream/api/zipAllWith.mjs +22 -23
- package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
- package/_mjs/Stream/api/zipWith.mjs +2 -2
- package/_mjs/Stream/api/zipWith.mjs.map +1 -1
- package/_mjs/Stream/api/zipWithChunks.mjs +20 -21
- package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +430 -417
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/Stream/internal/Handoff.mjs +12 -12
- package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
- package/_mjs/Stream/internal/Pull.mjs +1 -1
- package/_mjs/Stream/internal/Pull.mjs.map +1 -1
- package/_mjs/Stream/internal/Take.mjs +1 -1
- package/_mjs/Stream/internal/Take.mjs.map +1 -1
- package/_mjs/Supervisor/api.mjs +2 -1
- package/_mjs/Supervisor/api.mjs.map +1 -1
- package/_mjs/Supervisor/constructors.mjs +9 -6
- package/_mjs/Supervisor/constructors.mjs.map +1 -1
- package/_mjs/TFuture/api.mjs +10 -10
- package/_mjs/TFuture/api.mjs.map +1 -1
- package/_mjs/TFuture/constructors.mjs +4 -4
- package/_mjs/TFuture/constructors.mjs.map +1 -1
- package/_mjs/TFuture/definition.mjs +2 -3
- package/_mjs/TFuture/definition.mjs.map +1 -1
- package/_mjs/TReentrantLock/api.mjs +41 -42
- package/_mjs/TReentrantLock/api.mjs.map +1 -1
- package/_mjs/TRef/api.mjs +40 -40
- package/_mjs/TRef/api.mjs.map +1 -1
- package/_mjs/TRef/constructors.mjs +6 -6
- package/_mjs/TRef/constructors.mjs.map +1 -1
- package/_mjs/TSemaphore/api.mjs +17 -18
- package/_mjs/TSemaphore/api.mjs.map +1 -1
- package/_mjs/TSemaphore/constructors.mjs +2 -2
- package/_mjs/TSemaphore/constructors.mjs.map +1 -1
- package/_mjs/TSemaphore/definition.mjs +2 -3
- package/_mjs/TSemaphore/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs +1 -1
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs +1 -1
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/filterIO.mjs +5 -6
- package/_mjs/collection/immutable/Conc/filterIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/findIO.mjs +7 -8
- package/_mjs/collection/immutable/Conc/findIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/mapIO.mjs +3 -4
- package/_mjs/collection/immutable/Conc/mapIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/takeWhileIO.mjs +7 -8
- package/_mjs/collection/immutable/Conc/takeWhileIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc.mjs +2 -0
- package/_mjs/collection/immutable/Conc.mjs.map +1 -1
- package/_mjs/data/Exit/foreachIO.mjs +2 -3
- package/_mjs/data/Exit/foreachIO.mjs.map +1 -1
- package/_mjs/global.mjs +2 -0
- package/_mjs/global.mjs.map +1 -0
- package/_mjs/index.mjs +2 -0
- package/_mjs/index.mjs.map +1 -0
- package/_mjs/internal/Scheduler.mjs +62 -15
- package/_mjs/internal/Scheduler.mjs.map +1 -1
- package/_src/Cached/api.ts +4 -3
- package/_src/Channel/api/interruptWhen.ts +1 -1
- package/_src/Channel/api/mapOutIOC.ts +2 -2
- package/_src/Channel/api/mergeAll.ts +1 -1
- package/_src/Channel/api/mergeAllUnboundedWith.ts +1 -1
- package/_src/Channel/api/mergeAllWith.ts +3 -3
- package/_src/Channel/api/mergeMap.ts +1 -1
- package/_src/Channel/api/mergeWith.ts +9 -9
- package/_src/Channel/api/runScoped.ts +1 -1
- package/_src/Channel/api/toPull.ts +1 -1
- package/_src/Channel/api/zipC.ts +3 -3
- package/_src/Channel/api.ts +73 -73
- package/_src/Channel/core-api.ts +11 -13
- package/_src/Channel/definition.ts +19 -19
- package/_src/Channel/internal/MergeDecision.ts +1 -1
- package/_src/Clock/live.ts +1 -1
- package/_src/Console/api.ts +1 -1
- package/_src/Fiber/FiberContext.ts +10 -8
- package/_src/Fiber/api/await.ts +1 -1
- package/_src/Fiber/api/awaitAll.ts +1 -1
- package/_src/Fiber/api/children.ts +1 -1
- package/_src/Fiber/api/collectAll.ts +4 -1
- package/_src/Fiber/api/evalOn.ts +6 -1
- package/_src/Fiber/api/evalOnIO.ts +2 -1
- package/_src/Fiber/api/fromIO.ts +1 -1
- package/_src/Fiber/api/id.ts +1 -1
- package/_src/Fiber/api/inheritRefs.ts +1 -1
- package/_src/Fiber/api/interrupt.ts +1 -1
- package/_src/Fiber/api/interruptAll.ts +2 -2
- package/_src/Fiber/api/interruptAs.ts +1 -1
- package/_src/Fiber/api/join.ts +1 -1
- package/_src/Fiber/api/joinAll.ts +1 -1
- package/_src/Fiber/api/mapFiber.ts +5 -1
- package/_src/Fiber/api/mapIO.ts +6 -2
- package/_src/Fiber/api/poll.ts +1 -1
- package/_src/Fiber/api/zipWith.ts +1 -0
- package/_src/Fiber/constructors.ts +5 -5
- package/_src/Fiber/definition.ts +1 -1
- package/_src/FiberRef/api/locallyScoped.ts +1 -1
- package/_src/FiberRef/api/locallyScopedWith.ts +5 -1
- package/_src/FiberRef/api.ts +7 -7
- package/_src/FiberRef/constructors.ts +4 -2
- package/_src/FiberRef/unsafe.ts +7 -0
- package/_src/Future/api.ts +24 -16
- package/_src/Future/constructors.ts +2 -2
- package/_src/Hub/api.ts +50 -23
- package/_src/Hub/definition.ts +6 -6
- package/_src/Hub/internal.ts +15 -15
- package/_src/IO/api/acquireRelease.ts +2 -1
- package/_src/IO/api/acquireReleaseExit.ts +1 -1
- package/_src/IO/api/acquireReleaseInterruptible.ts +1 -1
- package/_src/IO/api/acquireReleaseInterruptibleExit.ts +1 -1
- package/_src/IO/api/addFinalizer.ts +1 -4
- package/_src/IO/api/addFinalizerExit.ts +6 -5
- package/_src/IO/api/asyncIO.ts +4 -1
- package/_src/IO/api/bracket.ts +2 -1
- package/_src/IO/api/bracketExit.ts +2 -1
- package/_src/IO/api/concurrency.ts +6 -3
- package/_src/IO/api/concurrentFinalizers.ts +1 -1
- package/_src/IO/api/consoleWith.ts +1 -1
- package/_src/IO/api/core-scope.ts +1 -1
- package/_src/IO/api/ensuringChildren.ts +3 -2
- package/_src/IO/api/environment.ts +9 -11
- package/_src/IO/api/foreachC.ts +33 -6
- package/_src/IO/api/foreachExec.ts +1 -0
- package/_src/IO/api/forkScoped.ts +1 -1
- package/_src/IO/api/fulfill.ts +1 -1
- package/_src/IO/api/interrupt.ts +13 -5
- package/_src/IO/api/memoize.ts +3 -3
- package/_src/IO/api/onExit.ts +2 -1
- package/_src/IO/api/onTermination.ts +2 -2
- package/_src/IO/api/provideLayer.ts +1 -0
- package/_src/IO/api/provideSomeLayer.ts +1 -3
- package/_src/IO/api/race.ts +6 -2
- package/_src/IO/api/raceFirst.ts +6 -2
- package/_src/IO/api/randomWith.ts +1 -1
- package/_src/IO/api/repeat.ts +7 -7
- package/_src/IO/api/retry.ts +7 -7
- package/_src/IO/api/schedule.ts +4 -3
- package/_src/IO/api/scope.ts +1 -1
- package/_src/IO/api/scopeWith.ts +1 -1
- package/_src/IO/api/scoped.ts +2 -2
- package/_src/IO/api/sequenceT.ts +1 -1
- package/_src/IO/api/stateful.ts +1 -1
- package/_src/IO/api/timeout.ts +5 -1
- package/_src/IO/api/withChildren.ts +1 -1
- package/_src/IO/api/withEarlyRelease.ts +4 -1
- package/_src/IO/api/withFinalizer.ts +2 -1
- package/_src/IO/api/withFinalizerExit.ts +2 -1
- package/_src/IO/api/withRuntimeConfig.ts +5 -1
- package/_src/IO/api/zipC.ts +7 -2
- package/_src/IO/api.ts +125 -75
- package/_src/IO/definition.ts +32 -27
- package/_src/IO/runtime.ts +66 -12
- package/_src/IOEnv/definition.ts +1 -1
- package/_src/Layer/MemoMap.ts +41 -34
- package/_src/Layer/api.ts +82 -49
- package/_src/Layer/definition.ts +11 -8
- package/_src/Queue/api/dimapIO.ts +21 -11
- package/_src/Queue/api/filterInputIO.ts +6 -4
- package/_src/Queue/api/filterOutputIO.ts +8 -6
- package/_src/Queue/api/operations.ts +28 -10
- package/_src/Queue/api/poll.ts +4 -1
- package/_src/Queue/api/takeBetween.ts +6 -1
- package/_src/Queue/api/zipWithIO.ts +13 -10
- package/_src/Queue/constructors.ts +4 -4
- package/_src/Queue/definition.ts +10 -10
- package/_src/Queue/internal.ts +7 -7
- package/_src/Queue/strategy.ts +18 -10
- package/_src/Random/api.ts +5 -5
- package/_src/Random/definition.ts +5 -5
- package/_src/Random/live.ts +4 -4
- package/_src/Ref/Atomic/Atomic.ts +3 -3
- package/_src/Ref/Atomic/api.ts +10 -10
- package/_src/Ref/Derived.ts +3 -3
- package/_src/Ref/DerivedAll.ts +3 -3
- package/_src/Ref/Synchronized/api.ts +33 -18
- package/_src/Ref/Synchronized/constructors.ts +5 -5
- package/_src/Ref/Synchronized/definition.ts +2 -2
- package/_src/Ref/api/collect.ts +1 -0
- package/_src/Ref/api/dimap.ts +7 -0
- package/_src/Ref/api/filter.ts +2 -0
- package/_src/Ref/api/get.ts +5 -2
- package/_src/Ref/api/modify.ts +21 -9
- package/_src/Ref/api/set.ts +5 -1
- package/_src/Ref/constructors.ts +2 -2
- package/_src/Ref/definition.ts +14 -14
- package/_src/STM/api/core-api.ts +20 -7
- package/_src/STM/api/core-constructors.ts +7 -7
- package/_src/STM/api.ts +150 -116
- package/_src/STM/definition.ts +6 -6
- package/_src/STM/driver.ts +3 -3
- package/_src/STM/internal/Journal.ts +25 -16
- package/_src/Schedule/Decision.ts +10 -3
- package/_src/Schedule/Driver.ts +2 -2
- package/_src/Schedule/api/driver.ts +6 -6
- package/_src/Schedule/api.ts +182 -82
- package/_src/Schedule/definition.ts +1 -1
- package/_src/Scope/Finalizer/definition.ts +2 -2
- package/_src/Scope/ReleaseMap/api/releaseAll.ts +6 -1
- package/_src/Scope/ReleaseMap/api.ts +15 -5
- package/_src/Scope/ReleaseMap/definition.ts +1 -1
- package/_src/Scope/api.ts +23 -15
- package/_src/ScopedRef/api.ts +12 -17
- package/_src/ScopedRef/definition.ts +1 -1
- package/_src/Sink/api.ts +111 -85
- package/_src/State/api.ts +1 -1
- package/_src/Stream/api/zipAllWith.ts +5 -2
- package/_src/Stream/api/zipWith.ts +2 -1
- package/_src/Stream/api/zipWithChunks.ts +5 -2
- package/_src/Stream/api.ts +484 -216
- package/_src/Stream/definition.ts +3 -3
- package/_src/Stream/internal/Take.ts +1 -1
- package/_src/Supervisor/constructors.ts +7 -3
- package/_src/TFuture/api.ts +5 -5
- package/_src/TFuture/constructors.ts +2 -2
- package/_src/TFuture/definition.ts +1 -1
- package/_src/TReentrantLock/api.ts +18 -18
- package/_src/TRef/api.ts +36 -14
- package/_src/TRef/constructors.ts +4 -4
- package/_src/TSemaphore/api.ts +7 -7
- package/_src/TSemaphore/constructors.ts +1 -1
- package/_src/TSemaphore/definition.ts +1 -1
- package/_src/collection/immutable/Conc/filterIO.ts +5 -1
- package/_src/collection/immutable/Conc/findIO.ts +6 -1
- package/_src/collection/immutable/Conc/mapIO.ts +1 -1
- package/_src/collection/immutable/Conc/takeWhileIO.ts +5 -1
- package/_src/collection/immutable/Conc.ts +2 -0
- package/_src/data/Exit/foreachIO.ts +1 -0
- package/_src/global.ts +149 -0
- package/_src/index.ts +42 -0
- package/_src/internal/Scheduler.ts +59 -15
- package/collection/immutable/Conc/filterIO.d.ts +1 -1
- package/collection/immutable/Conc/findIO.d.ts +2 -2
- package/collection/immutable/Conc/mapIO.d.ts +1 -1
- package/collection/immutable/Conc/takeWhileIO.d.ts +1 -1
- package/collection/immutable/Conc.d.ts +2 -0
- package/data/Exit/foreachIO.d.ts +2 -2
- package/global.d.ts +149 -0
- package/index.d.ts +40 -0
- package/internal/Scheduler.d.ts +18 -1
- package/package.json +3 -3
package/_src/Schedule/api.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Decision, DecisionTag } from "./Decision.js";
|
|
|
6
6
|
export function make<State, Env, In, Out>(
|
|
7
7
|
initial: State,
|
|
8
8
|
step: (now: number, inp: In, state: State, __tsplusTrace?: string) => IO<Env, never, readonly [State, Out, Decision]>,
|
|
9
|
+
__tsplusTrace?: string,
|
|
9
10
|
): Schedule.WithState<State, Env, In, Out> {
|
|
10
11
|
return new (class extends Schedule<Env, In, Out> {
|
|
11
12
|
readonly _State!: State;
|
|
@@ -20,6 +21,7 @@ export function make<State, Env, In, Out>(
|
|
|
20
21
|
export function addDelay_<State, Env, In, Out>(
|
|
21
22
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
22
23
|
f: (out: Out) => number,
|
|
24
|
+
__tsplusTrace?: string,
|
|
23
25
|
): Schedule.WithState<State, Env, In, Out> {
|
|
24
26
|
return self.addDelayIO((out) => IO.succeed(f(out)));
|
|
25
27
|
}
|
|
@@ -30,7 +32,8 @@ export function addDelay_<State, Env, In, Out>(
|
|
|
30
32
|
export function addDelayIO_<State, Env, In, Out, Env1>(
|
|
31
33
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
32
34
|
f: (out: Out) => URIO<Env1, number>,
|
|
33
|
-
|
|
35
|
+
__tsplusTrace?: string,
|
|
36
|
+
): Schedule.WithState<State, Env | Env1, In, Out> {
|
|
34
37
|
return self.modifyDelayIO((out, duration) => f(out).map((d) => duration + d));
|
|
35
38
|
}
|
|
36
39
|
|
|
@@ -40,7 +43,8 @@ export function addDelayIO_<State, Env, In, Out, Env1>(
|
|
|
40
43
|
export function andThen<State, Env, In, Out, State1, Env1, In1, Out1>(
|
|
41
44
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
42
45
|
that: Schedule.WithState<State1, Env1, In1, Out1>,
|
|
43
|
-
|
|
46
|
+
__tsplusTrace?: string,
|
|
47
|
+
): Schedule.WithState<readonly [State, State1, boolean], Env | Env1, In & In1, Out | Out1> {
|
|
44
48
|
return self.andThenEither(that).map((out) => out.value);
|
|
45
49
|
}
|
|
46
50
|
|
|
@@ -50,8 +54,9 @@ export function andThen<State, Env, In, Out, State1, Env1, In1, Out1>(
|
|
|
50
54
|
export function andThenEither_<State, Env, In, Out, State1, Env1, In1, Out1>(
|
|
51
55
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
52
56
|
that: Schedule.WithState<State1, Env1, In1, Out1>,
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
__tsplusTrace?: string,
|
|
58
|
+
): Schedule.WithState<readonly [State, State1, boolean], Env | Env1, In & In1, Either<Out, Out1>> {
|
|
59
|
+
return Schedule<readonly [State, State1, boolean], Env | Env1, In & In1, Either<Out, Out1>>(
|
|
55
60
|
[self.initial, that.initial, true],
|
|
56
61
|
(now, inp, [s1, s2, onLeft]) => {
|
|
57
62
|
if (onLeft) {
|
|
@@ -79,6 +84,7 @@ export function andThenEither_<State, Env, In, Out, State1, Env1, In1, Out1>(
|
|
|
79
84
|
export function as_<State, Env, In, Out, Out2>(
|
|
80
85
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
81
86
|
out2: Lazy<Out2>,
|
|
87
|
+
__tsplusTrace?: string,
|
|
82
88
|
): Schedule.WithState<State, Env, In, Out2> {
|
|
83
89
|
return self.map(() => out2());
|
|
84
90
|
}
|
|
@@ -89,6 +95,7 @@ export function as_<State, Env, In, Out, Out2>(
|
|
|
89
95
|
export function check_<State, Env, In, Out>(
|
|
90
96
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
91
97
|
test: (inp: In, out: Out) => boolean,
|
|
98
|
+
__tsplusTrace?: string,
|
|
92
99
|
): Schedule.WithState<State, Env, In, Out> {
|
|
93
100
|
return self.checkIO((inp, out) => IO.succeed(test(inp, out)));
|
|
94
101
|
}
|
|
@@ -99,7 +106,8 @@ export function check_<State, Env, In, Out>(
|
|
|
99
106
|
export function checkIO_<State, Env, In, Out, Env1>(
|
|
100
107
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
101
108
|
test: (inp: In, out: Out) => URIO<Env1, boolean>,
|
|
102
|
-
|
|
109
|
+
__tsplusTrace?: string,
|
|
110
|
+
): Schedule.WithState<State, Env | Env1, In, Out> {
|
|
103
111
|
return Schedule(self.initial, (now, inp, state) =>
|
|
104
112
|
self.step(now, inp, state).flatMap(([state, out, decision]) =>
|
|
105
113
|
decision.match(
|
|
@@ -117,7 +125,8 @@ export function checkIO_<State, Env, In, Out, Env1>(
|
|
|
117
125
|
export function compose_<S, R, I, O, S1, R1, O2>(
|
|
118
126
|
self: Schedule.WithState<S, R, I, O>,
|
|
119
127
|
that: Schedule.WithState<S1, R1, O, O2>,
|
|
120
|
-
|
|
128
|
+
__tsplusTrace?: string,
|
|
129
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I, O2> {
|
|
121
130
|
return Schedule([self.initial, that.initial], (now, inp, state) =>
|
|
122
131
|
self.step(now, inp, state[0]).flatMap(([lState, out, decision]) =>
|
|
123
132
|
decision.match(
|
|
@@ -140,6 +149,7 @@ export function compose_<S, R, I, O, S1, R1, O2>(
|
|
|
140
149
|
export function contramap_<S, R, I, O, I2>(
|
|
141
150
|
self: Schedule.WithState<S, R, I, O>,
|
|
142
151
|
f: (inp: I2) => I,
|
|
152
|
+
__tsplusTrace?: string,
|
|
143
153
|
): Schedule.WithState<S, R, I2, O> {
|
|
144
154
|
return self.contramapIO((inp2) => IO.succeed(f(inp2)));
|
|
145
155
|
}
|
|
@@ -150,6 +160,7 @@ export function contramap_<S, R, I, O, I2>(
|
|
|
150
160
|
export function contramapEnvironment_<S, R, I, O, R1>(
|
|
151
161
|
self: Schedule.WithState<S, R, I, O>,
|
|
152
162
|
f: (env: Environment<R1>) => Environment<R>,
|
|
163
|
+
__tsplusTrace?: string,
|
|
153
164
|
): Schedule.WithState<S, R1, I, O> {
|
|
154
165
|
return Schedule(self.initial, (now, inp, state) => self.step(now, inp, state).contramapEnvironment(f));
|
|
155
166
|
}
|
|
@@ -160,14 +171,18 @@ export function contramapEnvironment_<S, R, I, O, R1>(
|
|
|
160
171
|
export function contramapIO_<S, R, I, O, R1, I2>(
|
|
161
172
|
self: Schedule.WithState<S, R, I, O>,
|
|
162
173
|
f: (inp: I2) => URIO<R1, I>,
|
|
163
|
-
|
|
174
|
+
__tsplusTrace?: string,
|
|
175
|
+
): Schedule.WithState<S, R | R1, I2, O> {
|
|
164
176
|
return Schedule(self.initial, (now, inp2, state) => f(inp2).flatMap((inp) => self.step(now, inp, state)));
|
|
165
177
|
}
|
|
166
178
|
|
|
167
179
|
/**
|
|
168
180
|
* @tsplus static fncts.io.ScheduleOps delayed
|
|
169
181
|
*/
|
|
170
|
-
export function delayed<S, R, I>(
|
|
182
|
+
export function delayed<S, R, I>(
|
|
183
|
+
schedule: Schedule.WithState<S, R, I, number>,
|
|
184
|
+
__tsplusTrace?: string,
|
|
185
|
+
): Schedule.WithState<S, R, I, number> {
|
|
171
186
|
return schedule.addDelay((x) => x);
|
|
172
187
|
}
|
|
173
188
|
|
|
@@ -177,6 +192,7 @@ export function delayed<S, R, I>(schedule: Schedule.WithState<S, R, I, number>):
|
|
|
177
192
|
export function delayedSelf_<S, R, I, O>(
|
|
178
193
|
self: Schedule.WithState<S, R, I, O>,
|
|
179
194
|
f: (delay: number) => number,
|
|
195
|
+
__tsplusTrace?: string,
|
|
180
196
|
): Schedule.WithState<S, R, I, O> {
|
|
181
197
|
return self.delayedIO((delay) => IO.succeed(f(delay)));
|
|
182
198
|
}
|
|
@@ -187,20 +203,24 @@ export function delayedSelf_<S, R, I, O>(
|
|
|
187
203
|
export function delayedIO_<S, R, I, O, R1>(
|
|
188
204
|
self: Schedule.WithState<S, R, I, O>,
|
|
189
205
|
f: (delay: number) => URIO<R1, number>,
|
|
190
|
-
|
|
206
|
+
__tsplusTrace?: string,
|
|
207
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
191
208
|
return self.modifyDelayIO((_, delay) => f(delay));
|
|
192
209
|
}
|
|
193
210
|
|
|
194
211
|
/**
|
|
195
212
|
* @tsplus getter fncts.io.Schedule delays
|
|
196
213
|
*/
|
|
197
|
-
export function delays<S, R, I, O>(
|
|
214
|
+
export function delays<S, R, I, O>(
|
|
215
|
+
self: Schedule.WithState<S, R, I, O>,
|
|
216
|
+
__tsplusTrace?: string,
|
|
217
|
+
): Schedule.WithState<S, R, I, number> {
|
|
198
218
|
return Schedule(self.initial, (now, inp, state) =>
|
|
199
219
|
self.step(now, inp, state).flatMap(([state, _, decision]) =>
|
|
200
220
|
decision.match(
|
|
201
221
|
() => IO.succeedNow([state, 0, Decision.Done]),
|
|
202
222
|
(interval) => {
|
|
203
|
-
const delay = interval.
|
|
223
|
+
const delay = interval.start - now;
|
|
204
224
|
return IO.succeedNow([state, delay, Decision.Continue(interval)]);
|
|
205
225
|
},
|
|
206
226
|
),
|
|
@@ -215,6 +235,7 @@ export function dimap_<S, R, I, O, I2, O2>(
|
|
|
215
235
|
self: Schedule.WithState<S, R, I, O>,
|
|
216
236
|
f: (inp2: I2) => I,
|
|
217
237
|
g: (out: O) => O2,
|
|
238
|
+
__tsplusTrace?: string,
|
|
218
239
|
): Schedule.WithState<S, R, I2, O2> {
|
|
219
240
|
return self.contramap(f).map(g);
|
|
220
241
|
}
|
|
@@ -226,19 +247,23 @@ export function dimapIO_<S, R, I, O, R1, I2, R2, O2>(
|
|
|
226
247
|
self: Schedule.WithState<S, R, I, O>,
|
|
227
248
|
f: (inp2: I2) => URIO<R1, I>,
|
|
228
249
|
g: (out: O) => URIO<R2, O2>,
|
|
229
|
-
|
|
250
|
+
__tsplusTrace?: string,
|
|
251
|
+
): Schedule.WithState<S, R | R1 | R2, I2, O2> {
|
|
230
252
|
return self.contramapIO(f).mapIO(g);
|
|
231
253
|
}
|
|
232
254
|
|
|
233
255
|
/**
|
|
234
256
|
* @tsplus static fncts.io.ScheduleOps duration
|
|
235
257
|
*/
|
|
236
|
-
export function duration(
|
|
237
|
-
|
|
258
|
+
export function duration(
|
|
259
|
+
duration: number,
|
|
260
|
+
__tsplusTrace?: string,
|
|
261
|
+
): Schedule.WithState<boolean, never, unknown, number> {
|
|
262
|
+
return Schedule<boolean, never, unknown, number>(true, (now, _, state) =>
|
|
238
263
|
IO.succeed(() => {
|
|
239
264
|
if (state) {
|
|
240
265
|
const interval = Interval.after(now + duration);
|
|
241
|
-
return [false, duration, Decision.
|
|
266
|
+
return [false, duration, Decision.continueWith(interval)];
|
|
242
267
|
} else {
|
|
243
268
|
return [false, 0, Decision.Done];
|
|
244
269
|
}
|
|
@@ -246,21 +271,43 @@ export function duration(duration: number): Schedule.WithState<boolean, unknown,
|
|
|
246
271
|
);
|
|
247
272
|
}
|
|
248
273
|
|
|
274
|
+
/**
|
|
275
|
+
* @tsplus fluent fncts.io.Schedule either
|
|
276
|
+
* @tsplus operator fncts.io.Schedule ||
|
|
277
|
+
*/
|
|
278
|
+
export function either<S, R, I, O, S1, R1, I1, O1>(
|
|
279
|
+
self: Schedule.WithState<S, R, I, O>,
|
|
280
|
+
that: Schedule.WithState<S1, R1, I1, O1>,
|
|
281
|
+
__tsplusTrace?: string,
|
|
282
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, readonly [O, O1]> {
|
|
283
|
+
return self.unionWith(that, (interval1, interval2) => interval1 || interval2);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @tsplus fluent fncts.io.Schedule eitherWith
|
|
288
|
+
*/
|
|
289
|
+
export function eitherWith<S, R, I, O, S1, R1, I1, O1, O2>(
|
|
290
|
+
self: Schedule.WithState<S, R, I, O>,
|
|
291
|
+
that: Schedule.WithState<S1, R1, I1, O1>,
|
|
292
|
+
f: (out1: O, out2: O1) => O2,
|
|
293
|
+
__tsplusTrace?: string,
|
|
294
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, O2> {
|
|
295
|
+
return (self || that).map(f.tupled);
|
|
296
|
+
}
|
|
297
|
+
|
|
249
298
|
/**
|
|
250
299
|
* @tsplus static fncts.io.ScheduleOps elapsed
|
|
251
300
|
*/
|
|
252
|
-
export const elapsed: Schedule.WithState<Maybe<number>,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
(start)
|
|
259
|
-
|
|
260
|
-
return [Just(start), duration, Decision.Continue(Interval(now, Number.MAX_SAFE_INTEGER))];
|
|
261
|
-
},
|
|
262
|
-
),
|
|
301
|
+
export const elapsed: Schedule.WithState<Maybe<number>, never, unknown, number> = Schedule(Nothing(), (now, _, state) =>
|
|
302
|
+
IO.succeed(
|
|
303
|
+
state.match(
|
|
304
|
+
() => [Just(now), 0, Decision.continueWith(Interval(now, Number.MAX_SAFE_INTEGER))],
|
|
305
|
+
(start) => {
|
|
306
|
+
const duration = now - start;
|
|
307
|
+
return [Just(start), duration, Decision.continueWith(Interval(now, Number.MAX_SAFE_INTEGER))];
|
|
308
|
+
},
|
|
263
309
|
),
|
|
310
|
+
),
|
|
264
311
|
);
|
|
265
312
|
|
|
266
313
|
/**
|
|
@@ -269,6 +316,7 @@ export const elapsed: Schedule.WithState<Maybe<number>, unknown, unknown, number
|
|
|
269
316
|
export function ensuring_<S, R, I, O>(
|
|
270
317
|
self: Schedule.WithState<S, R, I, O>,
|
|
271
318
|
finalizer: UIO<any>,
|
|
319
|
+
__tsplusTrace?: string,
|
|
272
320
|
): Schedule.WithState<S, R, I, O> {
|
|
273
321
|
return Schedule(self.initial, (now, inp, state) =>
|
|
274
322
|
self.step(now, inp, state).flatMap(([state, out, decision]) =>
|
|
@@ -283,7 +331,11 @@ export function ensuring_<S, R, I, O>(
|
|
|
283
331
|
/**
|
|
284
332
|
* @tsplus static fncts.io.ScheduleOps exponential
|
|
285
333
|
*/
|
|
286
|
-
export function exponential(
|
|
334
|
+
export function exponential(
|
|
335
|
+
base: number,
|
|
336
|
+
factor = 2,
|
|
337
|
+
__tsplusTrace?: string,
|
|
338
|
+
): Schedule.WithState<number, never, unknown, number> {
|
|
287
339
|
return Schedule.delayed(Schedule.forever.map((i) => base * Math.pow(factor, i)));
|
|
288
340
|
}
|
|
289
341
|
|
|
@@ -303,20 +355,21 @@ export function exponential(base: number, factor = 2): Schedule.WithState<number
|
|
|
303
355
|
*/
|
|
304
356
|
export function fixed(
|
|
305
357
|
interval: number,
|
|
306
|
-
|
|
358
|
+
__tsplusTrace?: string,
|
|
359
|
+
): Schedule.WithState<readonly [Maybe<readonly [number, number]>, number], never, unknown, number> {
|
|
307
360
|
return Schedule([Nothing(), 0], (now, inp, [ms, n]) =>
|
|
308
361
|
IO.succeed(
|
|
309
362
|
ms.match(
|
|
310
363
|
() => {
|
|
311
364
|
const nextRun = now + interval;
|
|
312
|
-
return [[Just([now, nextRun]), n + 1], n, Decision.
|
|
365
|
+
return [[Just([now, nextRun]), n + 1], n, Decision.continueWith(Interval.after(nextRun))];
|
|
313
366
|
},
|
|
314
367
|
([startMillis, lastRun]) => {
|
|
315
368
|
const runningBehind = now > lastRun + interval;
|
|
316
369
|
const boundary = interval === 0 ? interval : interval - ((now - startMillis) % interval);
|
|
317
370
|
const sleepTime = boundary === 0 ? interval : boundary;
|
|
318
371
|
const nextRun = runningBehind ? now : now + sleepTime;
|
|
319
|
-
return [[Just([startMillis, nextRun]), n + 1], n, Decision.
|
|
372
|
+
return [[Just([startMillis, nextRun]), n + 1], n, Decision.continueWith(Interval.after(nextRun))];
|
|
320
373
|
},
|
|
321
374
|
),
|
|
322
375
|
),
|
|
@@ -330,6 +383,7 @@ export function fold_<S, R, I, O, Z>(
|
|
|
330
383
|
self: Schedule.WithState<S, R, I, O>,
|
|
331
384
|
z: Z,
|
|
332
385
|
f: (z: Z, out: O) => Z,
|
|
386
|
+
__tsplusTrace?: string,
|
|
333
387
|
): Schedule.WithState<readonly [S, Z], R, I, Z> {
|
|
334
388
|
return self.foldIO(z, (z, out) => IO.succeed(f(z, out)));
|
|
335
389
|
}
|
|
@@ -341,7 +395,8 @@ export function foldIO_<S, R, I, O, Z, R1>(
|
|
|
341
395
|
self: Schedule.WithState<S, R, I, O>,
|
|
342
396
|
z: Z,
|
|
343
397
|
f: (z: Z, out: O) => URIO<R1, Z>,
|
|
344
|
-
|
|
398
|
+
__tsplusTrace?: string,
|
|
399
|
+
): Schedule.WithState<readonly [S, Z], R | R1, I, Z> {
|
|
345
400
|
return Schedule([self.initial, z], (now, inp, [s, z]) =>
|
|
346
401
|
self.step(now, inp, s).flatMap(([s, out, decision]) =>
|
|
347
402
|
decision.match(
|
|
@@ -355,7 +410,10 @@ export function foldIO_<S, R, I, O, Z, R1>(
|
|
|
355
410
|
/**
|
|
356
411
|
* @tsplus getter fncts.io.Schedule forever
|
|
357
412
|
*/
|
|
358
|
-
export function foreverSelf<S, R, I, O>(
|
|
413
|
+
export function foreverSelf<S, R, I, O>(
|
|
414
|
+
self: Schedule.WithState<S, R, I, O>,
|
|
415
|
+
__tsplusTrace?: string,
|
|
416
|
+
): Schedule.WithState<S, R, I, O> {
|
|
359
417
|
return Schedule(self.initial, (now, inp, state) =>
|
|
360
418
|
self.step(now, inp, state).flatMap(([state, out, decision]) =>
|
|
361
419
|
decision.match(
|
|
@@ -374,8 +432,8 @@ export const forever = Schedule.unfold(0, (n) => n + 1);
|
|
|
374
432
|
/**
|
|
375
433
|
* @tsplus static fncts.io.ScheduleOps identity
|
|
376
434
|
*/
|
|
377
|
-
export function identity<A>(): Schedule.WithState<void,
|
|
378
|
-
return Schedule(undefined, (now, inp, state) => IO.succeed([state, inp, Decision.
|
|
435
|
+
export function identity<A>(__tsplusTrace?: string): Schedule.WithState<void, never, A, A> {
|
|
436
|
+
return Schedule(undefined, (now, inp, state) => IO.succeed([state, inp, Decision.continueWith(Interval.after(now))]));
|
|
379
437
|
}
|
|
380
438
|
|
|
381
439
|
function intersectWithLoop<S, R, I, O, S1, R1, I1, O1>(
|
|
@@ -384,24 +442,25 @@ function intersectWithLoop<S, R, I, O, S1, R1, I1, O1>(
|
|
|
384
442
|
inp: I & I1,
|
|
385
443
|
lState: S,
|
|
386
444
|
out: O,
|
|
387
|
-
lInterval:
|
|
445
|
+
lInterval: Intervals,
|
|
388
446
|
rState: S1,
|
|
389
447
|
out2: O1,
|
|
390
|
-
rInterval:
|
|
391
|
-
f: (lInterval:
|
|
392
|
-
|
|
448
|
+
rInterval: Intervals,
|
|
449
|
+
f: (lInterval: Intervals, rInterval: Intervals) => Intervals,
|
|
450
|
+
__tsplusTrace?: string,
|
|
451
|
+
): IO<R | R1, never, readonly [readonly [S, S1], readonly [O, O1], Decision]> {
|
|
393
452
|
const combined = f(lInterval, rInterval);
|
|
394
453
|
if (combined.isNonEmpty) {
|
|
395
454
|
return IO.succeedNow([[lState, rState], [out, out2], Decision.Continue(combined)]);
|
|
396
455
|
} else if (lInterval < rInterval) {
|
|
397
|
-
return self.step(lInterval.
|
|
456
|
+
return self.step(lInterval.end, inp, lState).flatMap(([lState, out, decision]) =>
|
|
398
457
|
decision.match(
|
|
399
458
|
() => IO.succeedNow([[lState, rState], [out, out2], Decision.Done]),
|
|
400
459
|
(lInterval) => intersectWithLoop(self, that, inp, lState, out, lInterval, rState, out2, rInterval, f),
|
|
401
460
|
),
|
|
402
461
|
);
|
|
403
462
|
} else {
|
|
404
|
-
return that.step(rInterval.
|
|
463
|
+
return that.step(rInterval.end, inp, rState).flatMap(([rState, out2, decision]) =>
|
|
405
464
|
decision.match(
|
|
406
465
|
() => IO.succeedNow([[lState, rState], [out, out2], Decision.Done]),
|
|
407
466
|
(rInterval) => intersectWithLoop(self, that, inp, lState, out, lInterval, rState, out2, rInterval, f),
|
|
@@ -416,8 +475,9 @@ function intersectWithLoop<S, R, I, O, S1, R1, I1, O1>(
|
|
|
416
475
|
export function intersectWith_<S, R, I, O, S1, R1, I1, O1>(
|
|
417
476
|
self: Schedule.WithState<S, R, I, O>,
|
|
418
477
|
that: Schedule.WithState<S1, R1, I1, O1>,
|
|
419
|
-
f: (int1:
|
|
420
|
-
|
|
478
|
+
f: (int1: Intervals, int2: Intervals) => Intervals,
|
|
479
|
+
__tsplusTrace?: string,
|
|
480
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, readonly [O, O1]> {
|
|
421
481
|
return Schedule([self.initial, that.initial] as const, (now, inp, state) => {
|
|
422
482
|
const left = self.step(now, inp, state[0]);
|
|
423
483
|
const right = that.step(now, inp, state[1]);
|
|
@@ -435,7 +495,7 @@ export function intersectWith_<S, R, I, O, S1, R1, I1, O1>(
|
|
|
435
495
|
/**
|
|
436
496
|
* @tsplus static fncts.io.Schedule linear
|
|
437
497
|
*/
|
|
438
|
-
export function linear(base: number): Schedule.WithState<number,
|
|
498
|
+
export function linear(base: number, __tsplusTrace?: string): Schedule.WithState<number, never, unknown, number> {
|
|
439
499
|
return Schedule.delayed(Schedule.forever.map((i) => base * (i + 1)));
|
|
440
500
|
}
|
|
441
501
|
|
|
@@ -445,6 +505,7 @@ export function linear(base: number): Schedule.WithState<number, unknown, unknow
|
|
|
445
505
|
export function map_<State, Env, In, Out, Out1>(
|
|
446
506
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
447
507
|
f: (out: Out) => Out1,
|
|
508
|
+
__tsplusTrace?: string,
|
|
448
509
|
): Schedule.WithState<State, Env, In, Out1> {
|
|
449
510
|
return self.mapIO((out) => IO.succeedNow(f(out)));
|
|
450
511
|
}
|
|
@@ -455,7 +516,8 @@ export function map_<State, Env, In, Out, Out1>(
|
|
|
455
516
|
export function mapIO_<State, Env, In, Out, Env1, Out1>(
|
|
456
517
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
457
518
|
f: (out: Out) => URIO<Env1, Out1>,
|
|
458
|
-
|
|
519
|
+
__tsplusTrace?: string,
|
|
520
|
+
): Schedule.WithState<State, Env | Env1, In, Out1> {
|
|
459
521
|
return Schedule(self.initial, (now, inp, state) =>
|
|
460
522
|
self.step(now, inp, state).flatMap(([state, out, decision]) => f(out).map((out1) => [state, out1, decision])),
|
|
461
523
|
);
|
|
@@ -467,21 +529,22 @@ export function mapIO_<State, Env, In, Out, Env1, Out1>(
|
|
|
467
529
|
export function modifyDelayIO_<State, Env, In, Out, Env1>(
|
|
468
530
|
self: Schedule.WithState<State, Env, In, Out>,
|
|
469
531
|
f: (out: Out, duration: number) => URIO<Env1, number>,
|
|
470
|
-
|
|
532
|
+
__tsplusTrace?: string,
|
|
533
|
+
): Schedule.WithState<State, Env | Env1, In, Out> {
|
|
471
534
|
return Schedule(self.initial, (now, inp, state) =>
|
|
472
535
|
self.step(now, inp, state).flatMap(([state, out, decision]) =>
|
|
473
536
|
decision.match(
|
|
474
537
|
() => IO.succeedNow([state, out, decision]),
|
|
475
538
|
(interval) => {
|
|
476
|
-
const delay = Interval(now, interval.
|
|
539
|
+
const delay = Interval(now, interval.start).size;
|
|
477
540
|
|
|
478
541
|
return f(out, delay).map((duration) => {
|
|
479
|
-
const oldStart = interval.
|
|
542
|
+
const oldStart = interval.start;
|
|
480
543
|
const newStart = now + duration;
|
|
481
544
|
const delta = newStart - oldStart;
|
|
482
|
-
const newEnd = interval.
|
|
545
|
+
const newEnd = interval.end + delta;
|
|
483
546
|
const newInterval = Interval(newStart, newEnd);
|
|
484
|
-
return [state, out, Decision.
|
|
547
|
+
return [state, out, Decision.continueWith(newInterval)];
|
|
485
548
|
});
|
|
486
549
|
},
|
|
487
550
|
),
|
|
@@ -495,7 +558,8 @@ export function modifyDelayIO_<State, Env, In, Out, Env1>(
|
|
|
495
558
|
export function onDecision_<S, R, I, O, R1>(
|
|
496
559
|
self: Schedule.WithState<S, R, I, O>,
|
|
497
560
|
f: (state: S, out: O, decision: Decision) => URIO<R1, any>,
|
|
498
|
-
|
|
561
|
+
__tsplusTrace?: string,
|
|
562
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
499
563
|
return Schedule(self.initial, (now, inp, state) =>
|
|
500
564
|
self.step(now, inp, state).flatMap(([state, out, decision]) => f(state, out, decision).as([state, out, decision])),
|
|
501
565
|
);
|
|
@@ -507,7 +571,8 @@ export function onDecision_<S, R, I, O, R1>(
|
|
|
507
571
|
export function provideEnvironment_<S, R, I, O>(
|
|
508
572
|
self: Schedule.WithState<S, R, I, O>,
|
|
509
573
|
env: Environment<R>,
|
|
510
|
-
|
|
574
|
+
__tsplusTrace?: string,
|
|
575
|
+
): Schedule.WithState<S, never, I, O> {
|
|
511
576
|
return Schedule(self.initial, (now, inp, state) => self.step(now, inp, state).provideEnvironment(env));
|
|
512
577
|
}
|
|
513
578
|
|
|
@@ -517,6 +582,7 @@ export function provideEnvironment_<S, R, I, O>(
|
|
|
517
582
|
export function reconsider_<S, R, I, O, O2>(
|
|
518
583
|
self: Schedule.WithState<S, R, I, O>,
|
|
519
584
|
f: (state: S, out: O, decision: Decision) => Either<O2, readonly [O2, Interval]>,
|
|
585
|
+
__tsplusTrace?: string,
|
|
520
586
|
): Schedule.WithState<S, R, I, O2> {
|
|
521
587
|
return self.reconsiderIO((state, out, decision) => IO.succeed(f(state, out, decision)));
|
|
522
588
|
}
|
|
@@ -527,7 +593,8 @@ export function reconsider_<S, R, I, O, O2>(
|
|
|
527
593
|
export function reconsiderIO_<S, R, I, O, R1, O1>(
|
|
528
594
|
self: Schedule.WithState<S, R, I, O>,
|
|
529
595
|
f: (state: S, out: O, decision: Decision) => URIO<R1, Either<O1, readonly [O1, Interval]>>,
|
|
530
|
-
|
|
596
|
+
__tsplusTrace?: string,
|
|
597
|
+
): Schedule.WithState<S, R | R1, I, O1> {
|
|
531
598
|
return Schedule(self.initial, (now, inp, state) =>
|
|
532
599
|
self.step(now, inp, state).flatMap(([state, out, decision]) =>
|
|
533
600
|
decision.match(
|
|
@@ -542,7 +609,7 @@ export function reconsiderIO_<S, R, I, O, R1, O1>(
|
|
|
542
609
|
f(state, out, decision).map((r) =>
|
|
543
610
|
r.match(
|
|
544
611
|
(out1) => [state, out1, Decision.Done],
|
|
545
|
-
([out1, interval]) => [state, out1, Decision.
|
|
612
|
+
([out1, interval]) => [state, out1, Decision.continueWith(interval)],
|
|
546
613
|
),
|
|
547
614
|
),
|
|
548
615
|
),
|
|
@@ -553,49 +620,55 @@ export function reconsiderIO_<S, R, I, O, R1, O1>(
|
|
|
553
620
|
/**
|
|
554
621
|
* @tsplus static fncts.io.Schedule recurs
|
|
555
622
|
*/
|
|
556
|
-
export function recurs(n: number): Schedule.WithState<number,
|
|
623
|
+
export function recurs(n: number, __tsplusTrace?: string): Schedule.WithState<number, never, unknown, number> {
|
|
557
624
|
return Schedule.forever.whileOutput((_) => _ < n);
|
|
558
625
|
}
|
|
559
626
|
|
|
560
627
|
/**
|
|
561
628
|
* @tsplus static fncts.io.Schedule recurWhile
|
|
562
629
|
*/
|
|
563
|
-
export function recurWhile<A>(f: (a: A) => boolean): Schedule.WithState<void,
|
|
630
|
+
export function recurWhile<A>(f: (a: A) => boolean, __tsplusTrace?: string): Schedule.WithState<void, never, A, A> {
|
|
564
631
|
return identity<A>().whileInput(f);
|
|
565
632
|
}
|
|
566
633
|
|
|
567
634
|
/**
|
|
568
635
|
* @tsplus static fncts.io.Schedule recurWhileIO
|
|
569
636
|
*/
|
|
570
|
-
export function recurWhileIO<R, A>(
|
|
637
|
+
export function recurWhileIO<R, A>(
|
|
638
|
+
f: (a: A) => URIO<R, boolean>,
|
|
639
|
+
__tsplusTrace?: string,
|
|
640
|
+
): Schedule.WithState<void, R, A, A> {
|
|
571
641
|
return identity<A>().whileInputIO(f);
|
|
572
642
|
}
|
|
573
643
|
|
|
574
644
|
/**
|
|
575
645
|
* @tsplus static fncts.io.Schedule recurWhileEquals
|
|
576
646
|
*/
|
|
577
|
-
export function recurWhileEquals<A>(value: Lazy<A
|
|
647
|
+
export function recurWhileEquals<A>(value: Lazy<A>, __tsplusTrace?: string): Schedule.WithState<void, never, A, A> {
|
|
578
648
|
return identity<A>().whileInput((a) => Equatable.strictEquals(a, value()));
|
|
579
649
|
}
|
|
580
650
|
|
|
581
651
|
/**
|
|
582
652
|
* @tsplus static fncts.io.Schedule recurUntil
|
|
583
653
|
*/
|
|
584
|
-
export function recurUntil<A>(f: (a: A) => boolean): Schedule.WithState<void,
|
|
654
|
+
export function recurUntil<A>(f: (a: A) => boolean, __tsplusTrace?: string): Schedule.WithState<void, never, A, A> {
|
|
585
655
|
return identity<A>().untilInput(f);
|
|
586
656
|
}
|
|
587
657
|
|
|
588
658
|
/**
|
|
589
659
|
* @tsplus static fncts.io.Schedule recurUntilIO
|
|
590
660
|
*/
|
|
591
|
-
export function recurUntilIO<R, A>(
|
|
661
|
+
export function recurUntilIO<R, A>(
|
|
662
|
+
f: (a: A) => URIO<R, boolean>,
|
|
663
|
+
__tsplusTrace?: string,
|
|
664
|
+
): Schedule.WithState<void, R, A, A> {
|
|
592
665
|
return identity<A>().untilInputIO(f);
|
|
593
666
|
}
|
|
594
667
|
|
|
595
668
|
/**
|
|
596
669
|
* @tsplus static fncts.io.Schedule recurUntilEquals
|
|
597
670
|
*/
|
|
598
|
-
export function recurUntilEquals<A>(value: Lazy<A
|
|
671
|
+
export function recurUntilEquals<A>(value: Lazy<A>, __tsplusTrace?: string): Schedule.WithState<void, never, A, A> {
|
|
599
672
|
return identity<A>().untilInput((a) => Equatable.strictEquals(a, value()));
|
|
600
673
|
}
|
|
601
674
|
|
|
@@ -604,6 +677,7 @@ export function recurUntilEquals<A>(value: Lazy<A>): Schedule.WithState<void, un
|
|
|
604
677
|
*/
|
|
605
678
|
export function repetitions<S, R, I, O>(
|
|
606
679
|
self: Schedule.WithState<S, R, I, O>,
|
|
680
|
+
__tsplusTrace?: string,
|
|
607
681
|
): Schedule.WithState<readonly [S, number], R, I, number> {
|
|
608
682
|
return self.fold(0, (n, _) => n + 1);
|
|
609
683
|
}
|
|
@@ -614,6 +688,7 @@ export function repetitions<S, R, I, O>(
|
|
|
614
688
|
export function resetAfter_<S, R, I, O>(
|
|
615
689
|
self: Schedule.WithState<S, R, I, O>,
|
|
616
690
|
duration: number,
|
|
691
|
+
__tsplusTrace?: string,
|
|
617
692
|
): Schedule.WithState<readonly [S, Maybe<number>], R, I, O> {
|
|
618
693
|
return self
|
|
619
694
|
.zip(Schedule.elapsed)
|
|
@@ -627,6 +702,7 @@ export function resetAfter_<S, R, I, O>(
|
|
|
627
702
|
export function resetWhen_<S, R, I, O>(
|
|
628
703
|
self: Schedule.WithState<S, R, I, O>,
|
|
629
704
|
f: (out: O) => boolean,
|
|
705
|
+
__tsplusTrace?: string,
|
|
630
706
|
): Schedule.WithState<S, R, I, O> {
|
|
631
707
|
return Schedule(self.initial, (now, inp, state) =>
|
|
632
708
|
self
|
|
@@ -644,6 +720,7 @@ export function run_<S, R, I, O>(
|
|
|
644
720
|
self: Schedule.WithState<S, R, I, O>,
|
|
645
721
|
now: number,
|
|
646
722
|
input: Iterable<I>,
|
|
723
|
+
__tsplusTrace?: string,
|
|
647
724
|
): URIO<R, Conc<O>> {
|
|
648
725
|
const loop = (now: number, xs: List<I>, state: S, acc: Conc<O>): URIO<R, Conc<O>> => {
|
|
649
726
|
if (xs.isEmpty()) {
|
|
@@ -652,7 +729,7 @@ export function run_<S, R, I, O>(
|
|
|
652
729
|
return self.step(now, xs.head, state).flatMap(([state, out, decision]) =>
|
|
653
730
|
decision.match(
|
|
654
731
|
() => IO.succeed(acc.append(out)),
|
|
655
|
-
(interval) => loop(interval.
|
|
732
|
+
(interval) => loop(interval.start, xs.tail, state, acc.append(out)),
|
|
656
733
|
),
|
|
657
734
|
);
|
|
658
735
|
}
|
|
@@ -663,14 +740,14 @@ export function run_<S, R, I, O>(
|
|
|
663
740
|
/**
|
|
664
741
|
* @tsplus static fncts.io.Schedule spaced
|
|
665
742
|
*/
|
|
666
|
-
export function spaced(duration: number): Schedule.WithState<number,
|
|
743
|
+
export function spaced(duration: number, __tsplusTrace?: string): Schedule.WithState<number, never, unknown, number> {
|
|
667
744
|
return Schedule.forever.addDelay(() => duration);
|
|
668
745
|
}
|
|
669
746
|
|
|
670
747
|
/**
|
|
671
748
|
* @tsplus static fncts.io.Schedule succeed
|
|
672
749
|
*/
|
|
673
|
-
export function succeed<A>(a: Lazy<A
|
|
750
|
+
export function succeed<A>(a: Lazy<A>, __tsplusTrace?: string): Schedule.WithState<number, never, unknown, A> {
|
|
674
751
|
return Schedule.forever.as(a);
|
|
675
752
|
}
|
|
676
753
|
|
|
@@ -680,7 +757,8 @@ export function succeed<A>(a: Lazy<A>): Schedule.WithState<number, unknown, unkn
|
|
|
680
757
|
export function tapInput_<S, R, I, O, R1>(
|
|
681
758
|
self: Schedule.WithState<S, R, I, O>,
|
|
682
759
|
f: (inp: I) => URIO<R1, any>,
|
|
683
|
-
|
|
760
|
+
__tsplusTrace?: string,
|
|
761
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
684
762
|
return Schedule(self.initial, (now, inp, state) => f(inp).apSecond(self.step(now, inp, state)));
|
|
685
763
|
}
|
|
686
764
|
|
|
@@ -690,7 +768,8 @@ export function tapInput_<S, R, I, O, R1>(
|
|
|
690
768
|
export function tapOutput_<S, R, I, O, R1>(
|
|
691
769
|
self: Schedule.WithState<S, R, I, O>,
|
|
692
770
|
f: (out: O) => URIO<R1, any>,
|
|
693
|
-
|
|
771
|
+
__tsplusTrace?: string,
|
|
772
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
694
773
|
return Schedule(self.initial, (now, inp, state) => self.step(now, inp, state).tap(([_, out]) => f(out)));
|
|
695
774
|
}
|
|
696
775
|
|
|
@@ -700,8 +779,9 @@ export function tapOutput_<S, R, I, O, R1>(
|
|
|
700
779
|
export function unionWith_<S, R, I, O, S1, R1, I1, O1>(
|
|
701
780
|
self: Schedule.WithState<S, R, I, O>,
|
|
702
781
|
that: Schedule.WithState<S1, R1, I1, O1>,
|
|
703
|
-
f: (int1:
|
|
704
|
-
|
|
782
|
+
f: (int1: Intervals, int2: Intervals) => Intervals,
|
|
783
|
+
__tsplusTrace?: string,
|
|
784
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, readonly [O, O1]> {
|
|
705
785
|
return Schedule([self.initial, that.initial], (now, inp, state) => {
|
|
706
786
|
const left = self.step(now, inp, state[0]);
|
|
707
787
|
const right = that.step(now, inp, state[1]);
|
|
@@ -729,9 +809,13 @@ export function unionWith_<S, R, I, O, S1, R1, I1, O1>(
|
|
|
729
809
|
/**
|
|
730
810
|
* @tsplus static fncts.io.ScheduleOps unfold
|
|
731
811
|
*/
|
|
732
|
-
export function unfold<A>(
|
|
733
|
-
|
|
734
|
-
|
|
812
|
+
export function unfold<A>(
|
|
813
|
+
a: Lazy<A>,
|
|
814
|
+
f: (a: A) => A,
|
|
815
|
+
__tsplusTrace?: string,
|
|
816
|
+
): Schedule.WithState<A, never, unknown, A> {
|
|
817
|
+
return Schedule<A, never, unknown, A>(a(), (now, inp, state) =>
|
|
818
|
+
IO.succeed([f(state), state, Decision.continueWith(Interval(now, Number.MAX_SAFE_INTEGER))]),
|
|
735
819
|
);
|
|
736
820
|
}
|
|
737
821
|
|
|
@@ -741,6 +825,7 @@ export function unfold<A>(a: Lazy<A>, f: (a: A) => A): Schedule.WithState<A, unk
|
|
|
741
825
|
export function untilInput_<S, R, I, O>(
|
|
742
826
|
self: Schedule.WithState<S, R, I, O>,
|
|
743
827
|
f: (inp: I) => boolean,
|
|
828
|
+
__tsplusTrace?: string,
|
|
744
829
|
): Schedule.WithState<S, R, I, O> {
|
|
745
830
|
return self.check((inp) => !f(inp));
|
|
746
831
|
}
|
|
@@ -751,7 +836,8 @@ export function untilInput_<S, R, I, O>(
|
|
|
751
836
|
export function untilInputIO_<S, R, I, O, R1>(
|
|
752
837
|
self: Schedule.WithState<S, R, I, O>,
|
|
753
838
|
f: (inp: I) => URIO<R1, boolean>,
|
|
754
|
-
|
|
839
|
+
__tsplusTrace?: string,
|
|
840
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
755
841
|
return self.checkIO((inp) => f(inp).map((b) => !b));
|
|
756
842
|
}
|
|
757
843
|
|
|
@@ -761,6 +847,7 @@ export function untilInputIO_<S, R, I, O, R1>(
|
|
|
761
847
|
export function untilOutput_<S, R, I, O>(
|
|
762
848
|
self: Schedule.WithState<S, R, I, O>,
|
|
763
849
|
f: (out: O) => boolean,
|
|
850
|
+
__tsplusTrace?: string,
|
|
764
851
|
): Schedule.WithState<S, R, I, O> {
|
|
765
852
|
return self.check((_, out) => !f(out));
|
|
766
853
|
}
|
|
@@ -771,14 +858,18 @@ export function untilOutput_<S, R, I, O>(
|
|
|
771
858
|
export function untilOutputIO_<S, R, I, O, R1>(
|
|
772
859
|
self: Schedule.WithState<S, R, I, O>,
|
|
773
860
|
f: (out: O) => URIO<R1, boolean>,
|
|
774
|
-
|
|
861
|
+
__tsplusTrace?: string,
|
|
862
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
775
863
|
return self.checkIO((_, out) => f(out).map((b) => !b));
|
|
776
864
|
}
|
|
777
865
|
|
|
778
866
|
/**
|
|
779
867
|
* @tsplus static fncts.io.Schedule upTo
|
|
780
868
|
*/
|
|
781
|
-
export function upTo(
|
|
869
|
+
export function upTo(
|
|
870
|
+
duration: number,
|
|
871
|
+
__tsplusTrace?: string,
|
|
872
|
+
): Schedule.WithState<Maybe<number>, never, unknown, number> {
|
|
782
873
|
return Schedule.elapsed.whileOutput((n) => n < duration);
|
|
783
874
|
}
|
|
784
875
|
|
|
@@ -788,6 +879,7 @@ export function upTo(duration: number): Schedule.WithState<Maybe<number>, unknow
|
|
|
788
879
|
export function whileInput_<S, R, I, O>(
|
|
789
880
|
self: Schedule.WithState<S, R, I, O>,
|
|
790
881
|
f: (inp: I) => boolean,
|
|
882
|
+
__tsplusTrace?: string,
|
|
791
883
|
): Schedule.WithState<S, R, I, O> {
|
|
792
884
|
return self.check((inp) => f(inp));
|
|
793
885
|
}
|
|
@@ -798,7 +890,8 @@ export function whileInput_<S, R, I, O>(
|
|
|
798
890
|
export function whileInputIO_<S, R, I, O, R1>(
|
|
799
891
|
self: Schedule.WithState<S, R, I, O>,
|
|
800
892
|
f: (inp: I) => URIO<R1, boolean>,
|
|
801
|
-
|
|
893
|
+
__tsplusTrace?: string,
|
|
894
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
802
895
|
return self.checkIO((inp) => f(inp));
|
|
803
896
|
}
|
|
804
897
|
|
|
@@ -808,6 +901,7 @@ export function whileInputIO_<S, R, I, O, R1>(
|
|
|
808
901
|
export function whileOutput_<S, R, I, O>(
|
|
809
902
|
self: Schedule.WithState<S, R, I, O>,
|
|
810
903
|
f: (out: O) => boolean,
|
|
904
|
+
__tsplusTrace?: string,
|
|
811
905
|
): Schedule.WithState<S, R, I, O> {
|
|
812
906
|
return self.check((_, out) => f(out));
|
|
813
907
|
}
|
|
@@ -818,7 +912,8 @@ export function whileOutput_<S, R, I, O>(
|
|
|
818
912
|
export function whileOutputIO_<S, R, I, O, R1>(
|
|
819
913
|
self: Schedule.WithState<S, R, I, O>,
|
|
820
914
|
f: (out: O) => URIO<R1, boolean>,
|
|
821
|
-
|
|
915
|
+
__tsplusTrace?: string,
|
|
916
|
+
): Schedule.WithState<S, R | R1, I, O> {
|
|
822
917
|
return self.checkIO((_, out) => f(out));
|
|
823
918
|
}
|
|
824
919
|
|
|
@@ -827,15 +922,16 @@ export function whileOutputIO_<S, R, I, O, R1>(
|
|
|
827
922
|
*/
|
|
828
923
|
export function windowed(
|
|
829
924
|
interval: number,
|
|
830
|
-
|
|
925
|
+
__tsplusTrace?: string,
|
|
926
|
+
): Schedule.WithState<readonly [Maybe<number>, number], never, unknown, number> {
|
|
831
927
|
return Schedule([Nothing(), 0], (now, inp, [m, n]) =>
|
|
832
928
|
IO.succeed(() =>
|
|
833
929
|
m.match(
|
|
834
|
-
() => [[Just(now), n + 1], n, Decision.
|
|
930
|
+
() => [[Just(now), n + 1], n, Decision.continueWith(Interval.after(now + interval))],
|
|
835
931
|
(startMillis) => [
|
|
836
932
|
[Just(startMillis), n + 1],
|
|
837
933
|
n,
|
|
838
|
-
Decision.
|
|
934
|
+
Decision.continueWith(Interval.after(now + (interval - ((now - startMillis) % interval)))),
|
|
839
935
|
],
|
|
840
936
|
),
|
|
841
937
|
),
|
|
@@ -848,7 +944,8 @@ export function windowed(
|
|
|
848
944
|
export function zip_<S, R, I, O, S1, R1, I1, O1>(
|
|
849
945
|
self: Schedule.WithState<S, R, I, O>,
|
|
850
946
|
that: Schedule.WithState<S1, R1, I1, O1>,
|
|
851
|
-
|
|
947
|
+
__tsplusTrace?: string,
|
|
948
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, readonly [O, O1]> {
|
|
852
949
|
return self.intersectWith(that, (lInterval, rInterval) => lInterval.intersect(rInterval));
|
|
853
950
|
}
|
|
854
951
|
|
|
@@ -858,7 +955,8 @@ export function zip_<S, R, I, O, S1, R1, I1, O1>(
|
|
|
858
955
|
export function zipLeft_<S, R, I, O, S1, R1, I1, O1>(
|
|
859
956
|
self: Schedule.WithState<S, R, I, O>,
|
|
860
957
|
that: Schedule.WithState<S1, R1, I1, O1>,
|
|
861
|
-
|
|
958
|
+
__tsplusTrace?: string,
|
|
959
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, O> {
|
|
862
960
|
return self.zip(that).map(([out]) => out);
|
|
863
961
|
}
|
|
864
962
|
|
|
@@ -868,7 +966,8 @@ export function zipLeft_<S, R, I, O, S1, R1, I1, O1>(
|
|
|
868
966
|
export function zipRight_<S, R, I, O, S1, R1, I1, O1>(
|
|
869
967
|
self: Schedule.WithState<S, R, I, O>,
|
|
870
968
|
that: Schedule.WithState<S1, R1, I1, O1>,
|
|
871
|
-
|
|
969
|
+
__tsplusTrace?: string,
|
|
970
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, O1> {
|
|
872
971
|
return self.zip(that).map(([_, out1]) => out1);
|
|
873
972
|
}
|
|
874
973
|
|
|
@@ -879,6 +978,7 @@ export function zipWith_<S, R, I, O, S1, R1, I1, O2, O3>(
|
|
|
879
978
|
self: Schedule.WithState<S, R, I, O>,
|
|
880
979
|
that: Schedule.WithState<S1, R1, I1, O2>,
|
|
881
980
|
f: (out1: O, out2: O2) => O3,
|
|
882
|
-
|
|
981
|
+
__tsplusTrace?: string,
|
|
982
|
+
): Schedule.WithState<readonly [S, S1], R | R1, I & I1, O3> {
|
|
883
983
|
return self.zip(that).map(([out1, out2]) => f(out1, out2));
|
|
884
984
|
}
|