@fncts/io 0.0.20 → 0.0.21
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 +2 -2
- package/Channel/ChildExecutorDecision/api.d.ts +2 -2
- package/Channel/UpstreamPullRequest/api.d.ts +2 -2
- package/Channel/api/interruptWhen.d.ts +5 -5
- package/Channel/api/mapOutIOC.d.ts +3 -3
- package/Channel/api/mergeAll.d.ts +2 -2
- package/Channel/api/mergeAllUnboundedWith.d.ts +2 -2
- package/Channel/api/mergeAllWith.d.ts +2 -2
- package/Channel/api/mergeMap.d.ts +2 -2
- package/Channel/api/mergeWith.d.ts +2 -2
- package/Channel/api/zipC.d.ts +6 -6
- package/Channel/api.d.ts +64 -64
- package/Channel/core-api.d.ts +11 -11
- package/Channel/definition.d.ts +35 -21
- package/Fiber/api/evalOn.d.ts +3 -3
- package/Fiber/api/evalOnIO.d.ts +3 -3
- package/Fiber/api/interruptAs.d.ts +3 -3
- package/Fiber/api/interruptAsFork.d.ts +3 -3
- package/Fiber/api/mapFiber.d.ts +2 -2
- package/Fiber/api/mapIO.d.ts +5 -5
- package/Fiber/api/zipWith.d.ts +2 -2
- package/Fiber.d.ts +1 -0
- package/FiberRef/api/locallyScoped.d.ts +2 -2
- package/FiberRef/api/locallyScopedWith.d.ts +2 -2
- package/FiberRef/api.d.ts +18 -18
- package/FiberRefs/api.d.ts +2 -2
- package/FiberRefs/join.d.ts +3 -3
- package/Future/api.d.ts +21 -21
- package/Hub/constructors.d.ts +49 -0
- package/Hub/definition.d.ts +37 -81
- package/Hub/internal.d.ts +4 -11
- package/Hub.d.ts +1 -1
- package/IO/api/acquireRelease.d.ts +1 -1
- package/IO/api/acquireReleaseExit.d.ts +1 -1
- package/IO/api/bracket.d.ts +1 -1
- package/IO/api/bracketExit.d.ts +1 -1
- package/IO/api/concurrency.d.ts +2 -2
- package/IO/api/core-scope.d.ts +5 -5
- package/IO/api/ensuringChildren.d.ts +3 -3
- package/IO/api/environment.d.ts +11 -15
- package/IO/api/foreachC.d.ts +2 -2
- package/IO/api/foreachExec.d.ts +1 -1
- package/IO/api/forkIn.d.ts +3 -3
- package/IO/api/fulfill.d.ts +3 -3
- package/IO/api/interrupt.d.ts +6 -6
- package/IO/api/onExit.d.ts +3 -3
- package/IO/api/onTermination.d.ts +4 -4
- package/IO/api/provideLayer.d.ts +3 -3
- package/IO/api/provideSomeLayer.d.ts +3 -7
- package/IO/api/race.d.ts +2 -2
- package/IO/api/raceFirst.d.ts +2 -2
- package/IO/api/repeat.d.ts +3 -3
- package/IO/api/retry.d.ts +7 -7
- package/IO/api/schedule.d.ts +5 -5
- package/IO/api/scoped.d.ts +2 -2
- package/IO/api/supervised.d.ts +3 -3
- package/IO/api/timeout.d.ts +5 -5
- package/IO/api/withFinalizer.d.ts +3 -3
- package/IO/api/withFinalizerExit.d.ts +3 -3
- package/IO/api/withRuntimeConfig.d.ts +3 -3
- package/IO/api/zipC.d.ts +4 -4
- package/IO/api.d.ts +179 -176
- package/IO/definition.d.ts +15 -9
- package/Layer/MemoMap.d.ts +4 -4
- package/Layer/api.d.ts +28 -28
- package/LogLevel.d.ts +12 -12
- package/LogSpan.d.ts +2 -2
- package/Logger/api.d.ts +5 -5
- package/Queue/constructors.d.ts +2 -1
- package/Queue/definition.d.ts +91 -82
- package/Queue/internal.d.ts +7 -9
- package/Queue.d.ts +0 -2
- package/Ref/Atomic.d.ts +15 -2
- package/Ref/Synchronized.d.ts +72 -0
- package/Ref/constructors.d.ts +7 -0
- package/Ref/definition.d.ts +60 -58
- package/Ref.d.ts +1 -6
- package/STM/api/core-api.d.ts +10 -10
- package/STM/api.d.ts +61 -61
- package/STM/internal/Journal.d.ts +4 -4
- package/Schedule/Decision.d.ts +2 -2
- package/Schedule/api.d.ts +94 -94
- package/Scope/ReleaseMap/api/releaseAll.d.ts +2 -2
- package/Scope/ReleaseMap/api.d.ts +10 -10
- package/Scope/api.d.ts +8 -8
- package/Sink/api.d.ts +68 -68
- package/State/api.d.ts +4 -4
- package/State/internal.d.ts +1 -1
- package/Stream/api/zipAllWith.d.ts +2 -2
- package/Stream/api/zipWith.d.ts +2 -2
- package/Stream/api/zipWithChunks.d.ts +2 -2
- package/Stream/api.d.ts +216 -205
- package/Stream/internal/DebounceState.d.ts +3 -3
- package/Stream/internal/Handoff.d.ts +5 -5
- package/Stream/internal/Pull.d.ts +2 -2
- package/Stream/internal/SinkEndReason.d.ts +3 -3
- package/Stream/internal/Take.d.ts +8 -8
- package/SubscriptionRef.d.ts +29 -0
- package/Supervisor/api.d.ts +4 -4
- package/SupervisorPatch.d.ts +4 -4
- package/TFuture/api.d.ts +7 -7
- package/TReentrantLock/api.d.ts +4 -4
- package/TRef/api.d.ts +24 -24
- package/TSemaphore/api.d.ts +4 -4
- package/TSemaphore/constructors.d.ts +6 -0
- package/_cjs/Cached/api.cjs +9 -9
- package/_cjs/Cached/api.cjs.map +1 -1
- package/_cjs/Channel/ChildExecutorDecision/api.cjs +19 -17
- package/_cjs/Channel/ChildExecutorDecision/api.cjs.map +1 -1
- package/_cjs/Channel/UpstreamPullRequest/api.cjs +16 -14
- package/_cjs/Channel/UpstreamPullRequest/api.cjs.map +1 -1
- package/_cjs/Channel/api/interruptWhen.cjs +14 -10
- package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
- package/_cjs/Channel/api/mapOutIOC.cjs +25 -25
- package/_cjs/Channel/api/mapOutIOC.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAll.cjs +6 -4
- package/_cjs/Channel/api/mergeAll.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs +6 -4
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +48 -52
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeMap.cjs +6 -4
- package/_cjs/Channel/api/mergeMap.cjs.map +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +48 -46
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api/run.cjs +1 -1
- package/_cjs/Channel/api/run.cjs.map +1 -1
- package/_cjs/Channel/api/runScoped.cjs +2 -2
- package/_cjs/Channel/api/runScoped.cjs.map +1 -1
- package/_cjs/Channel/api/toPull.cjs +3 -3
- package/_cjs/Channel/api/toPull.cjs.map +1 -1
- package/_cjs/Channel/api/zipC.cjs +20 -14
- package/_cjs/Channel/api/zipC.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +264 -218
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/core-api.cjs +34 -24
- package/_cjs/Channel/core-api.cjs.map +1 -1
- package/_cjs/Channel/definition.cjs +1 -1
- package/_cjs/Channel/definition.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +83 -83
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +22 -24
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Differ/api.cjs +5 -5
- package/_cjs/Differ/api.cjs.map +1 -1
- package/_cjs/Fiber/FiberContext.cjs +48 -48
- package/_cjs/Fiber/FiberContext.cjs.map +1 -1
- package/_cjs/Fiber/api/awaitAll.cjs +1 -1
- package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
- package/_cjs/Fiber/api/collectAll.cjs +1 -1
- package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
- package/_cjs/Fiber/api/evalOn.cjs +12 -10
- package/_cjs/Fiber/api/evalOn.cjs.map +1 -1
- package/_cjs/Fiber/api/evalOnIO.cjs +6 -4
- package/_cjs/Fiber/api/evalOnIO.cjs.map +1 -1
- package/_cjs/Fiber/api/fromIO.cjs +1 -1
- package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
- package/_cjs/Fiber/api/interrupt.cjs +1 -1
- package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAll.cjs +2 -2
- package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAs.cjs +6 -4
- package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAsFork.cjs +6 -4
- package/_cjs/Fiber/api/interruptAsFork.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 +1 -1
- package/_cjs/Fiber/api/join.cjs.map +1 -1
- package/_cjs/Fiber/api/joinAll.cjs +1 -1
- package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
- package/_cjs/Fiber/api/mapFiber.cjs +6 -4
- package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
- package/_cjs/Fiber/api/mapIO.cjs +14 -10
- package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
- package/_cjs/Fiber/api/zipWith.cjs +6 -4
- package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
- package/_cjs/Fiber/definition.cjs.map +1 -1
- package/_cjs/Fiber.cjs +13 -0
- package/_cjs/Fiber.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScoped.cjs +6 -4
- package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScopedWith.cjs +5 -3
- package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
- package/_cjs/FiberRef/api.cjs +64 -47
- package/_cjs/FiberRef/api.cjs.map +1 -1
- package/_cjs/FiberRef/constructors.cjs +1 -1
- package/_cjs/FiberRef/constructors.cjs.map +1 -1
- package/_cjs/FiberRef.cjs.map +1 -1
- package/_cjs/FiberRefs/api.cjs +15 -13
- package/_cjs/FiberRefs/api.cjs.map +1 -1
- package/_cjs/FiberRefs/join.cjs +37 -35
- package/_cjs/FiberRefs/join.cjs.map +1 -1
- package/_cjs/FiberState/definition.cjs.map +1 -1
- package/_cjs/Future/api.cjs +97 -79
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Future/constructors.cjs +1 -1
- package/_cjs/Future/constructors.cjs.map +1 -1
- package/_cjs/Hub/constructors.cjs +93 -0
- package/_cjs/Hub/constructors.cjs.map +1 -0
- package/_cjs/Hub/definition.cjs +104 -13
- package/_cjs/Hub/definition.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +104 -129
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/Hub.cjs +4 -4
- 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/addFinalizerExit.cjs +1 -1
- package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/asyncIO.cjs +4 -4
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/bracket.cjs +3 -3
- package/_cjs/IO/api/bracket.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +3 -3
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/clockWith.cjs +2 -2
- package/_cjs/IO/api/clockWith.cjs.map +1 -1
- package/_cjs/IO/api/concurrency.cjs +9 -7
- package/_cjs/IO/api/concurrency.cjs.map +1 -1
- package/_cjs/IO/api/concurrentFinalizers.cjs +1 -1
- package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
- package/_cjs/IO/api/consoleWith.cjs +2 -2
- package/_cjs/IO/api/consoleWith.cjs.map +1 -1
- package/_cjs/IO/api/core-scope.cjs +45 -41
- package/_cjs/IO/api/core-scope.cjs.map +1 -1
- package/_cjs/IO/api/ensuringChildren.cjs +5 -3
- package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
- package/_cjs/IO/api/environment.cjs +35 -35
- package/_cjs/IO/api/environment.cjs.map +1 -1
- package/_cjs/IO/api/foreachC.cjs +19 -23
- package/_cjs/IO/api/foreachC.cjs.map +1 -1
- package/_cjs/IO/api/foreachExec.cjs +3 -3
- package/_cjs/IO/api/foreachExec.cjs.map +1 -1
- package/_cjs/IO/api/forkAll.cjs +1 -1
- package/_cjs/IO/api/forkAll.cjs.map +1 -1
- package/_cjs/IO/api/forkIn.cjs +8 -6
- 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 +8 -6
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +36 -30
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/memoize.cjs +1 -1
- package/_cjs/IO/api/memoize.cjs.map +1 -1
- package/_cjs/IO/api/onExit.cjs +6 -4
- package/_cjs/IO/api/onExit.cjs.map +1 -1
- package/_cjs/IO/api/onTermination.cjs +5 -3
- package/_cjs/IO/api/onTermination.cjs.map +1 -1
- package/_cjs/IO/api/once.cjs +3 -5
- package/_cjs/IO/api/once.cjs.map +1 -1
- package/_cjs/IO/api/provideLayer.cjs +6 -4
- package/_cjs/IO/api/provideLayer.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeLayer.cjs +5 -15
- package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
- package/_cjs/IO/api/race.cjs +6 -4
- package/_cjs/IO/api/race.cjs.map +1 -1
- package/_cjs/IO/api/raceFirst.cjs +6 -4
- package/_cjs/IO/api/raceFirst.cjs.map +1 -1
- package/_cjs/IO/api/randomWith.cjs +1 -1
- package/_cjs/IO/api/randomWith.cjs.map +1 -1
- package/_cjs/IO/api/repeat.cjs +12 -12
- package/_cjs/IO/api/repeat.cjs.map +1 -1
- package/_cjs/IO/api/retry.cjs +14 -14
- package/_cjs/IO/api/retry.cjs.map +1 -1
- package/_cjs/IO/api/schedule.cjs +15 -11
- package/_cjs/IO/api/schedule.cjs.map +1 -1
- package/_cjs/IO/api/scoped.cjs +6 -6
- package/_cjs/IO/api/scoped.cjs.map +1 -1
- package/_cjs/IO/api/sequenceT.cjs +1 -1
- package/_cjs/IO/api/sequenceT.cjs.map +1 -1
- package/_cjs/IO/api/stateful.cjs.map +1 -1
- package/_cjs/IO/api/supervised.cjs +6 -4
- package/_cjs/IO/api/supervised.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +10 -6
- 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 +1 -1
- package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizer.cjs +6 -4
- package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizerExit.cjs +6 -4
- package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/withRuntimeConfig.cjs +6 -4
- package/_cjs/IO/api/withRuntimeConfig.cjs.map +1 -1
- package/_cjs/IO/api/zipC.cjs +21 -17
- package/_cjs/IO/api/zipC.cjs.map +1 -1
- package/_cjs/IO/api.cjs +634 -509
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +7 -7
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/IOEnv/definition.cjs +1 -1
- package/_cjs/IOEnv/definition.cjs.map +1 -1
- package/_cjs/IOEnv/live.cjs +1 -1
- package/_cjs/IOEnv/live.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +86 -92
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +110 -81
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Layer/definition.cjs.map +1 -1
- package/_cjs/LogLevel.cjs +24 -16
- package/_cjs/LogLevel.cjs.map +1 -1
- package/_cjs/LogSpan.cjs +18 -16
- package/_cjs/LogSpan.cjs.map +1 -1
- package/_cjs/Logger/api.cjs +18 -14
- package/_cjs/Logger/api.cjs.map +1 -1
- package/_cjs/Logger/constructors.cjs +1 -1
- package/_cjs/Logger/constructors.cjs.map +1 -1
- package/_cjs/Queue/constructors.cjs +19 -5
- package/_cjs/Queue/constructors.cjs.map +1 -1
- package/_cjs/Queue/definition.cjs +191 -16
- package/_cjs/Queue/definition.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +27 -181
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Queue/strategy.cjs +19 -19
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Queue.cjs +0 -26
- package/_cjs/Queue.cjs.map +1 -1
- package/_cjs/Random/live.cjs +2 -2
- package/_cjs/Random/live.cjs.map +1 -1
- package/_cjs/Ref/Atomic.cjs +47 -24
- package/_cjs/Ref/Atomic.cjs.map +1 -1
- package/_cjs/Ref/Synchronized.cjs +140 -0
- package/_cjs/Ref/Synchronized.cjs.map +1 -0
- package/_cjs/Ref/constructors.cjs +21 -2
- package/_cjs/Ref/constructors.cjs.map +1 -1
- package/_cjs/Ref/definition.cjs +105 -10
- package/_cjs/Ref/definition.cjs.map +1 -1
- package/_cjs/Ref.cjs +4 -69
- package/_cjs/Ref.cjs.map +1 -1
- package/_cjs/Reloadable/constructors.cjs +10 -10
- package/_cjs/Reloadable/constructors.cjs.map +1 -1
- package/_cjs/RuntimeConfig.cjs +2 -2
- package/_cjs/RuntimeConfig.cjs.map +1 -1
- package/_cjs/STM/api/core-api.cjs +36 -26
- package/_cjs/STM/api/core-api.cjs.map +1 -1
- package/_cjs/STM/api.cjs +217 -163
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +3 -3
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/Entry.cjs.map +1 -1
- package/_cjs/STM/internal/Journal.cjs +33 -29
- package/_cjs/STM/internal/Journal.cjs.map +1 -1
- package/_cjs/STM.cjs.map +1 -1
- package/_cjs/Schedule/Decision.cjs +16 -14
- package/_cjs/Schedule/Decision.cjs.map +1 -1
- package/_cjs/Schedule/api/driver.cjs +16 -20
- package/_cjs/Schedule/api/driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +381 -290
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +14 -14
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api.cjs +68 -61
- package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
- package/_cjs/Scope/api.cjs +34 -27
- package/_cjs/Scope/api.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +9 -13
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/ScopedRef/definition.cjs +1 -1
- package/_cjs/ScopedRef/definition.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +307 -249
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/State/api.cjs +18 -14
- package/_cjs/State/api.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +15 -13
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWith.cjs +6 -4
- package/_cjs/Stream/api/zipWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +13 -11
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +992 -788
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Stream/definition.cjs.map +1 -1
- package/_cjs/Stream/internal/DebounceState.cjs +21 -19
- package/_cjs/Stream/internal/DebounceState.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +35 -33
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/Pull.cjs +9 -11
- package/_cjs/Stream/internal/Pull.cjs.map +1 -1
- package/_cjs/Stream/internal/SinkEndReason.cjs +16 -14
- package/_cjs/Stream/internal/SinkEndReason.cjs.map +1 -1
- package/_cjs/Stream/internal/Take.cjs +32 -24
- package/_cjs/Stream/internal/Take.cjs.map +1 -1
- package/_cjs/Stream/internal/util.cjs +3 -3
- package/_cjs/Stream/internal/util.cjs.map +1 -1
- package/_cjs/SubscriptionRef.cjs +68 -0
- package/_cjs/SubscriptionRef.cjs.map +1 -0
- package/_cjs/Supervisor/api.cjs +24 -20
- package/_cjs/Supervisor/api.cjs.map +1 -1
- package/_cjs/Supervisor/constructors.cjs +2 -2
- package/_cjs/Supervisor/constructors.cjs.map +1 -1
- package/_cjs/Supervisor/definition.cjs +1 -1
- package/_cjs/Supervisor/definition.cjs.map +1 -1
- package/_cjs/SupervisorPatch.cjs +15 -11
- package/_cjs/SupervisorPatch.cjs.map +1 -1
- package/_cjs/TExit/definition.cjs.map +1 -1
- package/_cjs/TFuture/api.cjs +21 -15
- package/_cjs/TFuture/api.cjs.map +1 -1
- package/_cjs/TFuture/constructors.cjs +1 -1
- package/_cjs/TFuture/constructors.cjs.map +1 -1
- package/_cjs/TFuture/definition.cjs.map +1 -1
- package/_cjs/TReentrantLock/api.cjs +32 -28
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TReentrantLock/definition.cjs +4 -4
- package/_cjs/TReentrantLock/definition.cjs.map +1 -1
- package/_cjs/TRef/api.cjs +233 -209
- package/_cjs/TRef/api.cjs.map +1 -1
- package/_cjs/TRef/definition.cjs +4 -4
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +27 -23
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/TSemaphore/constructors.cjs +18 -3
- package/_cjs/TSemaphore/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +21 -19
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +21 -19
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/filterIO.cjs +16 -14
- package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/findIO.cjs +19 -17
- package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/mapIO.cjs +11 -9
- package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +31 -29
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
- package/_cjs/data/Exit/foreachIO.cjs +6 -4
- package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
- package/_cjs/internal/Hub.cjs +13 -11
- package/_cjs/internal/Hub.cjs.map +1 -1
- package/_cjs/internal/IsFatal.cjs +18 -16
- package/_cjs/internal/IsFatal.cjs.map +1 -1
- package/_cjs/internal/MutableQueue.cjs +11 -9
- package/_cjs/internal/MutableQueue.cjs.map +1 -1
- package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
- package/_mjs/Cached/api.mjs +6 -6
- package/_mjs/Cached/api.mjs.map +1 -1
- package/_mjs/Channel/ChildExecutorDecision/api.mjs +18 -16
- package/_mjs/Channel/ChildExecutorDecision/api.mjs.map +1 -1
- package/_mjs/Channel/UpstreamPullRequest/api.mjs +14 -12
- package/_mjs/Channel/UpstreamPullRequest/api.mjs.map +1 -1
- package/_mjs/Channel/api/interruptWhen.mjs +11 -7
- package/_mjs/Channel/api/interruptWhen.mjs.map +1 -1
- package/_mjs/Channel/api/mapOutIOC.mjs +24 -23
- package/_mjs/Channel/api/mapOutIOC.mjs.map +1 -1
- package/_mjs/Channel/api/mergeAll.mjs +5 -3
- package/_mjs/Channel/api/mergeAll.mjs.map +1 -1
- package/_mjs/Channel/api/mergeAllUnboundedWith.mjs +5 -3
- package/_mjs/Channel/api/mergeAllUnboundedWith.mjs.map +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +45 -46
- package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
- package/_mjs/Channel/api/mergeMap.mjs +5 -3
- package/_mjs/Channel/api/mergeMap.mjs.map +1 -1
- package/_mjs/Channel/api/mergeWith.mjs +46 -44
- package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
- package/_mjs/Channel/api/run.mjs +1 -1
- package/_mjs/Channel/api/run.mjs.map +1 -1
- package/_mjs/Channel/api/runScoped.mjs +2 -2
- package/_mjs/Channel/api/runScoped.mjs.map +1 -1
- package/_mjs/Channel/api/toPull.mjs +3 -3
- package/_mjs/Channel/api/toPull.mjs.map +1 -1
- package/_mjs/Channel/api/zipC.mjs +16 -10
- package/_mjs/Channel/api/zipC.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +224 -173
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/core-api.mjs +28 -18
- package/_mjs/Channel/core-api.mjs.map +1 -1
- package/_mjs/Channel/definition.mjs +1 -1
- package/_mjs/Channel/definition.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +83 -83
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +22 -23
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
- package/_mjs/Differ/api.mjs +5 -5
- package/_mjs/Differ/api.mjs.map +1 -1
- package/_mjs/Fiber/FiberContext.mjs +48 -48
- package/_mjs/Fiber/FiberContext.mjs.map +1 -1
- package/_mjs/Fiber/api/awaitAll.mjs +1 -1
- package/_mjs/Fiber/api/awaitAll.mjs.map +1 -1
- package/_mjs/Fiber/api/collectAll.mjs +1 -1
- package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
- package/_mjs/Fiber/api/evalOn.mjs +11 -9
- package/_mjs/Fiber/api/evalOn.mjs.map +1 -1
- package/_mjs/Fiber/api/evalOnIO.mjs +5 -3
- package/_mjs/Fiber/api/evalOnIO.mjs.map +1 -1
- package/_mjs/Fiber/api/fromIO.mjs +1 -1
- package/_mjs/Fiber/api/fromIO.mjs.map +1 -1
- package/_mjs/Fiber/api/interrupt.mjs +1 -1
- package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs +2 -2
- package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAs.mjs +6 -4
- package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAsFork.mjs +6 -4
- package/_mjs/Fiber/api/interruptAsFork.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 +1 -1
- package/_mjs/Fiber/api/join.mjs.map +1 -1
- package/_mjs/Fiber/api/joinAll.mjs +1 -1
- package/_mjs/Fiber/api/joinAll.mjs.map +1 -1
- package/_mjs/Fiber/api/mapFiber.mjs +5 -3
- package/_mjs/Fiber/api/mapFiber.mjs.map +1 -1
- package/_mjs/Fiber/api/mapIO.mjs +11 -7
- package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
- package/_mjs/Fiber/api/zipWith.mjs +5 -3
- package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
- package/_mjs/Fiber/definition.mjs.map +1 -1
- package/_mjs/Fiber.mjs +1 -0
- package/_mjs/Fiber.mjs.map +1 -1
- package/_mjs/FiberRef/api/locallyScoped.mjs +5 -3
- package/_mjs/FiberRef/api/locallyScoped.mjs.map +1 -1
- package/_mjs/FiberRef/api/locallyScopedWith.mjs +5 -3
- package/_mjs/FiberRef/api/locallyScopedWith.mjs.map +1 -1
- package/_mjs/FiberRef/api.mjs +52 -36
- package/_mjs/FiberRef/api.mjs.map +1 -1
- package/_mjs/FiberRef/constructors.mjs +1 -1
- package/_mjs/FiberRef/constructors.mjs.map +1 -1
- package/_mjs/FiberRef.mjs.map +1 -1
- package/_mjs/FiberRefs/api.mjs +14 -12
- package/_mjs/FiberRefs/api.mjs.map +1 -1
- package/_mjs/FiberRefs/join.mjs +35 -33
- package/_mjs/FiberRefs/join.mjs.map +1 -1
- package/_mjs/FiberState/definition.mjs.map +1 -1
- package/_mjs/Future/api.mjs +84 -66
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Future/constructors.mjs +1 -1
- package/_mjs/Future/constructors.mjs.map +1 -1
- package/_mjs/Hub/constructors.mjs +66 -0
- package/_mjs/Hub/constructors.mjs.map +1 -0
- package/_mjs/Hub/definition.mjs +88 -9
- package/_mjs/Hub/definition.mjs.map +1 -1
- package/_mjs/Hub/internal.mjs +105 -122
- package/_mjs/Hub/internal.mjs.map +1 -1
- package/_mjs/Hub.mjs +1 -1
- package/_mjs/Hub.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/addFinalizerExit.mjs +1 -1
- package/_mjs/IO/api/addFinalizerExit.mjs.map +1 -1
- package/_mjs/IO/api/asyncIO.mjs +4 -4
- 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 -2
- package/_mjs/IO/api/bracketExit.mjs.map +1 -1
- package/_mjs/IO/api/clockWith.mjs +2 -2
- package/_mjs/IO/api/clockWith.mjs.map +1 -1
- package/_mjs/IO/api/concurrency.mjs +8 -6
- package/_mjs/IO/api/concurrency.mjs.map +1 -1
- package/_mjs/IO/api/concurrentFinalizers.mjs +1 -1
- package/_mjs/IO/api/concurrentFinalizers.mjs.map +1 -1
- package/_mjs/IO/api/consoleWith.mjs +2 -2
- package/_mjs/IO/api/consoleWith.mjs.map +1 -1
- package/_mjs/IO/api/core-scope.mjs +40 -36
- package/_mjs/IO/api/core-scope.mjs.map +1 -1
- package/_mjs/IO/api/ensuringChildren.mjs +5 -3
- package/_mjs/IO/api/ensuringChildren.mjs.map +1 -1
- package/_mjs/IO/api/environment.mjs +29 -27
- package/_mjs/IO/api/environment.mjs.map +1 -1
- package/_mjs/IO/api/foreachC.mjs +17 -19
- package/_mjs/IO/api/foreachC.mjs.map +1 -1
- package/_mjs/IO/api/foreachExec.mjs +2 -2
- package/_mjs/IO/api/foreachExec.mjs.map +1 -1
- package/_mjs/IO/api/forkAll.mjs +1 -1
- package/_mjs/IO/api/forkAll.mjs.map +1 -1
- package/_mjs/IO/api/forkIn.mjs +7 -5
- 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 +7 -5
- package/_mjs/IO/api/fulfill.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +34 -28
- package/_mjs/IO/api/interrupt.mjs.map +1 -1
- package/_mjs/IO/api/memoize.mjs +1 -1
- package/_mjs/IO/api/memoize.mjs.map +1 -1
- package/_mjs/IO/api/onExit.mjs +5 -3
- package/_mjs/IO/api/onExit.mjs.map +1 -1
- package/_mjs/IO/api/onTermination.mjs +5 -3
- package/_mjs/IO/api/onTermination.mjs.map +1 -1
- package/_mjs/IO/api/once.mjs +3 -4
- package/_mjs/IO/api/once.mjs.map +1 -1
- package/_mjs/IO/api/provideLayer.mjs +5 -3
- package/_mjs/IO/api/provideLayer.mjs.map +1 -1
- package/_mjs/IO/api/provideSomeLayer.mjs +5 -11
- package/_mjs/IO/api/provideSomeLayer.mjs.map +1 -1
- package/_mjs/IO/api/race.mjs +5 -3
- package/_mjs/IO/api/race.mjs.map +1 -1
- package/_mjs/IO/api/raceFirst.mjs +5 -3
- package/_mjs/IO/api/raceFirst.mjs.map +1 -1
- package/_mjs/IO/api/randomWith.mjs +1 -1
- package/_mjs/IO/api/randomWith.mjs.map +1 -1
- package/_mjs/IO/api/repeat.mjs +8 -8
- package/_mjs/IO/api/repeat.mjs.map +1 -1
- package/_mjs/IO/api/retry.mjs +12 -12
- package/_mjs/IO/api/retry.mjs.map +1 -1
- package/_mjs/IO/api/schedule.mjs +15 -11
- package/_mjs/IO/api/schedule.mjs.map +1 -1
- package/_mjs/IO/api/scoped.mjs +3 -3
- package/_mjs/IO/api/scoped.mjs.map +1 -1
- package/_mjs/IO/api/sequenceT.mjs +1 -1
- package/_mjs/IO/api/sequenceT.mjs.map +1 -1
- package/_mjs/IO/api/stateful.mjs.map +1 -1
- package/_mjs/IO/api/supervised.mjs +5 -3
- package/_mjs/IO/api/supervised.mjs.map +1 -1
- package/_mjs/IO/api/timeout.mjs +10 -6
- 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 +1 -1
- package/_mjs/IO/api/withEarlyRelease.mjs.map +1 -1
- package/_mjs/IO/api/withFinalizer.mjs +5 -3
- package/_mjs/IO/api/withFinalizer.mjs.map +1 -1
- package/_mjs/IO/api/withFinalizerExit.mjs +5 -3
- package/_mjs/IO/api/withFinalizerExit.mjs.map +1 -1
- package/_mjs/IO/api/withRuntimeConfig.mjs +5 -3
- package/_mjs/IO/api/withRuntimeConfig.mjs.map +1 -1
- package/_mjs/IO/api/zipC.mjs +18 -14
- package/_mjs/IO/api/zipC.mjs.map +1 -1
- package/_mjs/IO/api.mjs +511 -387
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +7 -7
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/IOEnv/definition.mjs +1 -1
- package/_mjs/IOEnv/definition.mjs.map +1 -1
- package/_mjs/IOEnv/live.mjs +1 -1
- package/_mjs/IOEnv/live.mjs.map +1 -1
- package/_mjs/Layer/MemoMap.mjs +86 -87
- package/_mjs/Layer/MemoMap.mjs.map +1 -1
- package/_mjs/Layer/api.mjs +91 -63
- package/_mjs/Layer/api.mjs.map +1 -1
- package/_mjs/Layer/definition.mjs.map +1 -1
- package/_mjs/LogLevel.mjs +24 -16
- package/_mjs/LogLevel.mjs.map +1 -1
- package/_mjs/LogSpan.mjs +16 -14
- package/_mjs/LogSpan.mjs.map +1 -1
- package/_mjs/Logger/api.mjs +16 -12
- package/_mjs/Logger/api.mjs.map +1 -1
- package/_mjs/Logger/constructors.mjs +1 -1
- package/_mjs/Logger/constructors.mjs.map +1 -1
- package/_mjs/Queue/constructors.mjs +16 -5
- package/_mjs/Queue/constructors.mjs.map +1 -1
- package/_mjs/Queue/definition.mjs +174 -12
- package/_mjs/Queue/definition.mjs.map +1 -1
- package/_mjs/Queue/internal.mjs +21 -170
- package/_mjs/Queue/internal.mjs.map +1 -1
- package/_mjs/Queue/strategy.mjs +20 -23
- package/_mjs/Queue/strategy.mjs.map +1 -1
- package/_mjs/Queue.mjs +1 -3
- package/_mjs/Queue.mjs.map +1 -1
- package/_mjs/Random/live.mjs +2 -2
- package/_mjs/Random/live.mjs.map +1 -1
- package/_mjs/Ref/Atomic.mjs +39 -3
- package/_mjs/Ref/Atomic.mjs.map +1 -1
- package/_mjs/Ref/Synchronized.mjs +123 -0
- package/_mjs/Ref/Synchronized.mjs.map +1 -0
- package/_mjs/Ref/constructors.mjs +15 -1
- package/_mjs/Ref/constructors.mjs.map +1 -1
- package/_mjs/Ref/definition.mjs +96 -4
- package/_mjs/Ref/definition.mjs.map +1 -1
- package/_mjs/Ref.mjs +1 -8
- package/_mjs/Ref.mjs.map +1 -1
- package/_mjs/Reloadable/constructors.mjs +10 -10
- package/_mjs/Reloadable/constructors.mjs.map +1 -1
- package/_mjs/RuntimeConfig.mjs +2 -2
- package/_mjs/RuntimeConfig.mjs.map +1 -1
- package/_mjs/STM/api/core-api.mjs +29 -19
- package/_mjs/STM/api/core-api.mjs.map +1 -1
- package/_mjs/STM/api.mjs +180 -127
- package/_mjs/STM/api.mjs.map +1 -1
- package/_mjs/STM/driver.mjs +3 -3
- package/_mjs/STM/driver.mjs.map +1 -1
- package/_mjs/STM/internal/Entry.mjs.map +1 -1
- package/_mjs/STM/internal/Journal.mjs +33 -29
- package/_mjs/STM/internal/Journal.mjs.map +1 -1
- package/_mjs/STM.mjs.map +1 -1
- package/_mjs/Schedule/Decision.mjs +14 -12
- package/_mjs/Schedule/Decision.mjs.map +1 -1
- package/_mjs/Schedule/api/driver.mjs +15 -17
- package/_mjs/Schedule/api/driver.mjs.map +1 -1
- package/_mjs/Schedule/api.mjs +326 -234
- package/_mjs/Schedule/api.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs +12 -11
- package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/api.mjs +60 -51
- package/_mjs/Scope/ReleaseMap/api.mjs.map +1 -1
- package/_mjs/Scope/api.mjs +28 -22
- package/_mjs/Scope/api.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +9 -11
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/ScopedRef/definition.mjs +1 -1
- package/_mjs/ScopedRef/definition.mjs.map +1 -1
- package/_mjs/Sink/api.mjs +301 -240
- package/_mjs/Sink/api.mjs.map +1 -1
- package/_mjs/State/api.mjs +16 -12
- package/_mjs/State/api.mjs.map +1 -1
- package/_mjs/Stream/api/zipAllWith.mjs +14 -12
- package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
- package/_mjs/Stream/api/zipWith.mjs +5 -3
- package/_mjs/Stream/api/zipWith.mjs.map +1 -1
- package/_mjs/Stream/api/zipWithChunks.mjs +12 -10
- package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +856 -653
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/Stream/definition.mjs.map +1 -1
- package/_mjs/Stream/internal/DebounceState.mjs +18 -16
- package/_mjs/Stream/internal/DebounceState.mjs.map +1 -1
- package/_mjs/Stream/internal/Handoff.mjs +35 -32
- package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
- package/_mjs/Stream/internal/Pull.mjs +9 -10
- package/_mjs/Stream/internal/Pull.mjs.map +1 -1
- package/_mjs/Stream/internal/SinkEndReason.mjs +14 -12
- package/_mjs/Stream/internal/SinkEndReason.mjs.map +1 -1
- package/_mjs/Stream/internal/Take.mjs +28 -20
- package/_mjs/Stream/internal/Take.mjs.map +1 -1
- package/_mjs/Stream/internal/util.mjs +3 -3
- package/_mjs/Stream/internal/util.mjs.map +1 -1
- package/_mjs/SubscriptionRef.mjs +45 -0
- package/_mjs/SubscriptionRef.mjs.map +1 -0
- package/_mjs/Supervisor/api.mjs +22 -18
- package/_mjs/Supervisor/api.mjs.map +1 -1
- package/_mjs/Supervisor/constructors.mjs +2 -2
- package/_mjs/Supervisor/constructors.mjs.map +1 -1
- package/_mjs/Supervisor/definition.mjs +1 -1
- package/_mjs/Supervisor/definition.mjs.map +1 -1
- package/_mjs/SupervisorPatch.mjs +15 -11
- package/_mjs/SupervisorPatch.mjs.map +1 -1
- package/_mjs/TExit/definition.mjs.map +1 -1
- package/_mjs/TFuture/api.mjs +17 -11
- package/_mjs/TFuture/api.mjs.map +1 -1
- package/_mjs/TFuture/constructors.mjs +1 -1
- package/_mjs/TFuture/constructors.mjs.map +1 -1
- package/_mjs/TFuture/definition.mjs.map +1 -1
- package/_mjs/TReentrantLock/api.mjs +32 -28
- package/_mjs/TReentrantLock/api.mjs.map +1 -1
- package/_mjs/TReentrantLock/definition.mjs +4 -4
- package/_mjs/TReentrantLock/definition.mjs.map +1 -1
- package/_mjs/TRef/api.mjs +218 -194
- package/_mjs/TRef/api.mjs.map +1 -1
- package/_mjs/TRef/definition.mjs +4 -4
- package/_mjs/TRef/definition.mjs.map +1 -1
- package/_mjs/TSemaphore/api.mjs +23 -19
- package/_mjs/TSemaphore/api.mjs.map +1 -1
- package/_mjs/TSemaphore/constructors.mjs +12 -2
- package/_mjs/TSemaphore/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs +19 -17
- package/_mjs/collection/immutable/Conc/dropUntilIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs +19 -17
- package/_mjs/collection/immutable/Conc/dropWhileIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/filterIO.mjs +14 -12
- package/_mjs/collection/immutable/Conc/filterIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/findIO.mjs +17 -15
- package/_mjs/collection/immutable/Conc/findIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/mapIO.mjs +10 -8
- package/_mjs/collection/immutable/Conc/mapIO.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/takeWhileIO.mjs +28 -26
- package/_mjs/collection/immutable/Conc/takeWhileIO.mjs.map +1 -1
- package/_mjs/data/Exit/foreachIO.mjs +5 -3
- package/_mjs/data/Exit/foreachIO.mjs.map +1 -1
- package/_mjs/internal/Hub.mjs +13 -11
- package/_mjs/internal/Hub.mjs.map +1 -1
- package/_mjs/internal/IsFatal.mjs +18 -16
- package/_mjs/internal/IsFatal.mjs.map +1 -1
- package/_mjs/internal/MutableQueue.mjs +10 -8
- package/_mjs/internal/MutableQueue.mjs.map +1 -1
- package/_mjs/internal/StackTraceBuilder.mjs.map +1 -1
- package/_src/Cached/api.ts +2 -2
- package/_src/Channel/ChildExecutorDecision/api.ts +14 -17
- package/_src/Channel/UpstreamPullRequest/api.ts +11 -13
- package/_src/Channel/api/interruptWhen.ts +18 -17
- package/_src/Channel/api/mapOutIOC.ts +58 -58
- package/_src/Channel/api/mergeAll.ts +15 -16
- package/_src/Channel/api/mergeAllUnboundedWith.ts +15 -27
- package/_src/Channel/api/mergeAllWith.ts +114 -126
- package/_src/Channel/api/mergeMap.ts +8 -18
- package/_src/Channel/api/mergeWith.ts +154 -158
- package/_src/Channel/api/toPull.ts +1 -1
- package/_src/Channel/api/zipC.ts +52 -88
- package/_src/Channel/api.ts +345 -405
- package/_src/Channel/core-api.ts +75 -122
- package/_src/Channel/definition.ts +49 -7
- package/_src/Channel/internal/ChannelExecutor.ts +1 -5
- package/_src/Channel/internal/SingleProducerAsyncInput.ts +1 -3
- package/_src/Fiber/FiberContext.ts +13 -33
- package/_src/Fiber/api/collectAll.ts +1 -2
- package/_src/Fiber/api/evalOn.ts +11 -14
- package/_src/Fiber/api/evalOnIO.ts +10 -13
- package/_src/Fiber/api/interruptAll.ts +1 -2
- package/_src/Fiber/api/interruptAs.ts +6 -4
- package/_src/Fiber/api/interruptAsFork.ts +6 -4
- package/_src/Fiber/api/interruptFork.ts +1 -1
- package/_src/Fiber/api/mapFiber.ts +5 -7
- package/_src/Fiber/api/mapIO.ts +21 -21
- package/_src/Fiber/api/zipWith.ts +14 -17
- package/_src/Fiber/definition.ts +1 -15
- package/_src/Fiber.ts +1 -1
- package/_src/FiberRef/api/locallyScoped.ts +8 -6
- package/_src/FiberRef/api/locallyScopedWith.ts +5 -7
- package/_src/FiberRef/api.ts +50 -39
- package/_src/FiberRef.ts +0 -1
- package/_src/FiberRefs/api.ts +14 -12
- package/_src/FiberRefs/join.ts +37 -46
- package/_src/FiberState/definition.ts +1 -2
- package/_src/Future/api.ts +67 -53
- package/_src/Hub/constructors.ts +80 -0
- package/_src/Hub/definition.ts +95 -89
- package/_src/Hub/internal.ts +115 -165
- package/_src/Hub.ts +1 -1
- package/_src/IO/api/acquireRelease.ts +1 -1
- package/_src/IO/api/acquireReleaseExit.ts +1 -1
- package/_src/IO/api/bracket.ts +1 -1
- package/_src/IO/api/bracketExit.ts +1 -1
- package/_src/IO/api/clockWith.ts +0 -1
- package/_src/IO/api/concurrency.ts +5 -7
- package/_src/IO/api/consoleWith.ts +0 -2
- package/_src/IO/api/core-scope.ts +36 -33
- package/_src/IO/api/ensuringChildren.ts +8 -7
- package/_src/IO/api/environment.ts +24 -42
- package/_src/IO/api/foreachC.ts +24 -12
- package/_src/IO/api/foreachExec.ts +1 -1
- package/_src/IO/api/forkIn.ts +7 -9
- package/_src/IO/api/fulfill.ts +5 -3
- package/_src/IO/api/interrupt.ts +37 -40
- package/_src/IO/api/onExit.ts +8 -10
- package/_src/IO/api/onTermination.ts +12 -14
- package/_src/IO/api/provideLayer.ts +8 -10
- package/_src/IO/api/provideSomeLayer.ts +5 -14
- package/_src/IO/api/race.ts +19 -21
- package/_src/IO/api/raceFirst.ts +5 -7
- package/_src/IO/api/repeat.ts +3 -5
- package/_src/IO/api/retry.ts +19 -21
- package/_src/IO/api/schedule.ts +20 -21
- package/_src/IO/api/scoped.ts +2 -2
- package/_src/IO/api/sequenceT.ts +7 -1
- package/_src/IO/api/stateful.ts +0 -2
- package/_src/IO/api/supervised.ts +5 -7
- package/_src/IO/api/timeout.ts +10 -16
- package/_src/IO/api/withFinalizer.ts +5 -7
- package/_src/IO/api/withFinalizerExit.ts +6 -5
- package/_src/IO/api/withRuntimeConfig.ts +12 -14
- package/_src/IO/api/zipC.ts +57 -62
- package/_src/IO/api.ts +512 -539
- package/_src/IO/definition.ts +21 -9
- package/_src/IO/runtime.ts +0 -12
- package/_src/IO.ts +0 -1
- package/_src/Layer/MemoMap.ts +61 -63
- package/_src/Layer/api.ts +95 -104
- package/_src/Layer/definition.ts +0 -1
- package/_src/LogLevel.ts +24 -16
- package/_src/LogSpan.ts +16 -16
- package/_src/Logger/api.ts +18 -17
- package/_src/Logger/constructors.ts +9 -15
- package/_src/Queue/constructors.ts +22 -6
- package/_src/Queue/definition.ts +230 -81
- package/_src/Queue/internal.ts +9 -180
- package/_src/Queue/strategy.ts +9 -23
- package/_src/Queue.ts +1 -3
- package/_src/Ref/Atomic.ts +37 -4
- package/_src/Ref/Synchronized.ts +107 -0
- package/_src/Ref/constructors.ts +15 -0
- package/_src/Ref/definition.ts +86 -85
- package/_src/Ref.ts +1 -9
- package/_src/Reloadable/constructors.ts +2 -2
- package/_src/RuntimeConfig.ts +0 -2
- package/_src/STM/api/core-api.ts +32 -35
- package/_src/STM/api.ts +210 -200
- package/_src/STM/internal/Entry.ts +0 -10
- package/_src/STM/internal/Journal.ts +23 -26
- package/_src/STM.ts +0 -1
- package/_src/Schedule/Decision.ts +10 -8
- package/_src/Schedule/api/driver.ts +0 -4
- package/_src/Schedule/api.ts +419 -444
- package/_src/Schedule/definition.ts +0 -1
- package/_src/Scope/ReleaseMap/api/releaseAll.ts +23 -26
- package/_src/Scope/ReleaseMap/api.ts +77 -74
- package/_src/Scope/api.ts +16 -18
- package/_src/ScopedRef/api.ts +0 -3
- package/_src/ScopedRef/definition.ts +1 -2
- package/_src/Sink/api.ts +326 -357
- package/_src/State/api.ts +12 -8
- package/_src/State/internal.ts +1 -1
- package/_src/Stream/api/zipAllWith.ts +6 -5
- package/_src/Stream/api/zipWith.ts +5 -8
- package/_src/Stream/api/zipWithChunks.ts +6 -5
- package/_src/Stream/api.ts +1049 -1176
- package/_src/Stream/definition.ts +0 -2
- package/_src/Stream/internal/DebounceState.ts +16 -17
- package/_src/Stream/internal/Handoff.ts +31 -35
- package/_src/Stream/internal/Pull.ts +1 -2
- package/_src/Stream/internal/SinkEndReason.ts +13 -14
- package/_src/Stream/internal/Take.ts +21 -21
- package/_src/Stream/internal/util.ts +0 -2
- package/_src/SubscriptionRef.ts +44 -0
- package/_src/Supervisor/api.ts +18 -14
- package/_src/Supervisor/definition.ts +0 -1
- package/_src/SupervisorPatch.ts +10 -6
- package/_src/TExit/definition.ts +0 -8
- package/_src/TFuture/api.ts +23 -17
- package/_src/TFuture/definition.ts +0 -1
- package/_src/TReentrantLock/api.ts +14 -10
- package/_src/TReentrantLock/definition.ts +0 -7
- package/_src/TRef/api.ts +207 -209
- package/_src/TRef/definition.ts +0 -12
- package/_src/TSemaphore/api.ts +19 -18
- package/_src/TSemaphore/constructors.ts +7 -0
- package/_src/collection/immutable/Conc/dropUntilIO.ts +19 -21
- package/_src/collection/immutable/Conc/dropWhileIO.ts +21 -23
- package/_src/collection/immutable/Conc/filterIO.ts +15 -17
- package/_src/collection/immutable/Conc/findIO.ts +17 -19
- package/_src/collection/immutable/Conc/mapIO.ts +12 -10
- package/_src/collection/immutable/Conc/takeWhileIO.ts +27 -29
- package/_src/data/Exit/foreachIO.ts +8 -10
- package/_src/global.ts +7 -3
- package/_src/index.ts +3 -0
- package/_src/internal/Hub.ts +17 -27
- package/_src/internal/IsFatal.ts +14 -12
- package/_src/internal/MutableQueue.ts +8 -8
- package/_src/internal/StackTraceBuilder.ts +1 -2
- package/collection/immutable/Conc/dropUntilIO.d.ts +3 -3
- package/collection/immutable/Conc/dropWhileIO.d.ts +3 -3
- package/collection/immutable/Conc/filterIO.d.ts +3 -3
- package/collection/immutable/Conc/findIO.d.ts +2 -2
- package/collection/immutable/Conc/mapIO.d.ts +3 -3
- package/collection/immutable/Conc/takeWhileIO.d.ts +3 -3
- package/data/Exit/foreachIO.d.ts +3 -3
- package/global.d.ts +7 -3
- package/index.d.ts +3 -0
- package/internal/Hub.d.ts +2 -2
- package/internal/IsFatal.d.ts +3 -3
- package/internal/MutableQueue.d.ts +3 -3
- package/package.json +3 -3
- package/Hub/api.d.ts +0 -190
- package/Queue/api/dimapIO.d.ts +0 -41
- package/Queue/api/filterInputIO.d.ts +0 -33
- package/Queue/api/filterOutputIO.d.ts +0 -31
- package/Queue/api/operations.d.ts +0 -82
- package/Queue/api/poll.d.ts +0 -9
- package/Queue/api/takeBetween.d.ts +0 -11
- package/Queue/api/zipWithIO.d.ts +0 -44
- package/Queue/api.d.ts +0 -7
- package/Ref/Atomic/Atomic.d.ts +0 -18
- package/Ref/Atomic/api.d.ts +0 -53
- package/Ref/Derived.d.ts +0 -14
- package/Ref/DerivedAll.d.ts +0 -14
- package/Ref/Synchronized/api.d.ts +0 -100
- package/Ref/Synchronized/constructors.d.ts +0 -8
- package/Ref/Synchronized/definition.d.ts +0 -42
- package/Ref/api/collect.d.ts +0 -11
- package/Ref/api/dimap.d.ts +0 -56
- package/Ref/api/filter.d.ts +0 -20
- package/Ref/api/get.d.ts +0 -9
- package/Ref/api/match.d.ts +0 -13
- package/Ref/api/matchAll.d.ts +0 -11
- package/Ref/api/modify.d.ts +0 -79
- package/Ref/api/set.d.ts +0 -10
- package/Ref/api.d.ts +0 -23
- package/_cjs/Hub/api.cjs +0 -456
- package/_cjs/Hub/api.cjs.map +0 -1
- package/_cjs/Queue/api/dimapIO.cjs +0 -120
- package/_cjs/Queue/api/dimapIO.cjs.map +0 -1
- package/_cjs/Queue/api/filterInputIO.cjs +0 -84
- package/_cjs/Queue/api/filterInputIO.cjs.map +0 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +0 -89
- package/_cjs/Queue/api/filterOutputIO.cjs.map +0 -1
- package/_cjs/Queue/api/operations.cjs +0 -147
- package/_cjs/Queue/api/operations.cjs.map +0 -1
- package/_cjs/Queue/api/poll.cjs +0 -27
- package/_cjs/Queue/api/poll.cjs.map +0 -1
- package/_cjs/Queue/api/takeBetween.cjs +0 -57
- package/_cjs/Queue/api/takeBetween.cjs.map +0 -1
- package/_cjs/Queue/api/zipWithIO.cjs +0 -97
- package/_cjs/Queue/api/zipWithIO.cjs.map +0 -1
- package/_cjs/Queue/api.cjs +0 -97
- package/_cjs/Queue/api.cjs.map +0 -1
- package/_cjs/Ref/Atomic/Atomic.cjs +0 -64
- package/_cjs/Ref/Atomic/Atomic.cjs.map +0 -1
- package/_cjs/Ref/Atomic/api.cjs +0 -156
- package/_cjs/Ref/Atomic/api.cjs.map +0 -1
- package/_cjs/Ref/Derived.cjs +0 -55
- package/_cjs/Ref/Derived.cjs.map +0 -1
- package/_cjs/Ref/DerivedAll.cjs +0 -55
- package/_cjs/Ref/DerivedAll.cjs.map +0 -1
- package/_cjs/Ref/Synchronized/api.cjs +0 -196
- package/_cjs/Ref/Synchronized/api.cjs.map +0 -1
- package/_cjs/Ref/Synchronized/constructors.cjs +0 -32
- package/_cjs/Ref/Synchronized/constructors.cjs.map +0 -1
- package/_cjs/Ref/Synchronized/definition.cjs +0 -88
- package/_cjs/Ref/Synchronized/definition.cjs.map +0 -1
- package/_cjs/Ref/api/collect.cjs +0 -31
- package/_cjs/Ref/api/collect.cjs.map +0 -1
- package/_cjs/Ref/api/dimap.cjs +0 -110
- package/_cjs/Ref/api/dimap.cjs.map +0 -1
- package/_cjs/Ref/api/filter.cjs +0 -45
- package/_cjs/Ref/api/filter.cjs.map +0 -1
- package/_cjs/Ref/api/get.cjs +0 -20
- package/_cjs/Ref/api/get.cjs.map +0 -1
- package/_cjs/Ref/api/match.cjs +0 -26
- package/_cjs/Ref/api/match.cjs.map +0 -1
- package/_cjs/Ref/api/matchAll.cjs +0 -24
- package/_cjs/Ref/api/matchAll.cjs.map +0 -1
- package/_cjs/Ref/api/modify.cjs +0 -239
- package/_cjs/Ref/api/modify.cjs.map +0 -1
- package/_cjs/Ref/api/set.cjs +0 -21
- package/_cjs/Ref/api/set.cjs.map +0 -1
- package/_cjs/Ref/api.cjs +0 -158
- package/_cjs/Ref/api.cjs.map +0 -1
- package/_mjs/Hub/api.mjs +0 -384
- package/_mjs/Hub/api.mjs.map +0 -1
- package/_mjs/Queue/api/dimapIO.mjs +0 -97
- package/_mjs/Queue/api/dimapIO.mjs.map +0 -1
- package/_mjs/Queue/api/filterInputIO.mjs +0 -63
- package/_mjs/Queue/api/filterInputIO.mjs.map +0 -1
- package/_mjs/Queue/api/filterOutputIO.mjs +0 -68
- package/_mjs/Queue/api/filterOutputIO.mjs.map +0 -1
- package/_mjs/Queue/api/operations.mjs +0 -122
- package/_mjs/Queue/api/operations.mjs.map +0 -1
- package/_mjs/Queue/api/poll.mjs +0 -14
- package/_mjs/Queue/api/poll.mjs.map +0 -1
- package/_mjs/Queue/api/takeBetween.mjs +0 -43
- package/_mjs/Queue/api/takeBetween.mjs.map +0 -1
- package/_mjs/Queue/api/zipWithIO.mjs +0 -74
- package/_mjs/Queue/api/zipWithIO.mjs.map +0 -1
- package/_mjs/Queue/api.mjs +0 -9
- package/_mjs/Queue/api.mjs.map +0 -1
- package/_mjs/Ref/Atomic/Atomic.mjs +0 -47
- package/_mjs/Ref/Atomic/Atomic.mjs.map +0 -1
- package/_mjs/Ref/Atomic/api.mjs +0 -127
- package/_mjs/Ref/Atomic/api.mjs.map +0 -1
- package/_mjs/Ref/Derived.mjs +0 -35
- package/_mjs/Ref/Derived.mjs.map +0 -1
- package/_mjs/Ref/DerivedAll.mjs +0 -35
- package/_mjs/Ref/DerivedAll.mjs.map +0 -1
- package/_mjs/Ref/Synchronized/api.mjs +0 -154
- package/_mjs/Ref/Synchronized/api.mjs.map +0 -1
- package/_mjs/Ref/Synchronized/constructors.mjs +0 -15
- package/_mjs/Ref/Synchronized/constructors.mjs.map +0 -1
- package/_mjs/Ref/Synchronized/definition.mjs +0 -66
- package/_mjs/Ref/Synchronized/definition.mjs.map +0 -1
- package/_mjs/Ref/api/collect.mjs +0 -17
- package/_mjs/Ref/api/collect.mjs.map +0 -1
- package/_mjs/Ref/api/dimap.mjs +0 -84
- package/_mjs/Ref/api/dimap.mjs.map +0 -1
- package/_mjs/Ref/api/filter.mjs +0 -29
- package/_mjs/Ref/api/filter.mjs.map +0 -1
- package/_mjs/Ref/api/get.mjs +0 -13
- package/_mjs/Ref/api/get.mjs.map +0 -1
- package/_mjs/Ref/api/match.mjs +0 -18
- package/_mjs/Ref/api/match.mjs.map +0 -1
- package/_mjs/Ref/api/matchAll.mjs +0 -16
- package/_mjs/Ref/api/matchAll.mjs.map +0 -1
- package/_mjs/Ref/api/modify.mjs +0 -204
- package/_mjs/Ref/api/modify.mjs.map +0 -1
- package/_mjs/Ref/api/set.mjs +0 -14
- package/_mjs/Ref/api/set.mjs.map +0 -1
- package/_mjs/Ref/api.mjs +0 -34
- package/_mjs/Ref/api.mjs.map +0 -1
- package/_src/Hub/api.ts +0 -461
- package/_src/Queue/api/dimapIO.ts +0 -130
- package/_src/Queue/api/filterInputIO.ts +0 -75
- package/_src/Queue/api/filterOutputIO.ts +0 -76
- package/_src/Queue/api/operations.ts +0 -139
- package/_src/Queue/api/poll.ts +0 -14
- package/_src/Queue/api/takeBetween.ts +0 -45
- package/_src/Queue/api/zipWithIO.ts +0 -99
- package/_src/Queue/api.ts +0 -9
- package/_src/Ref/Atomic/Atomic.ts +0 -56
- package/_src/Ref/Atomic/api.ts +0 -124
- package/_src/Ref/Derived.ts +0 -71
- package/_src/Ref/DerivedAll.ts +0 -75
- package/_src/Ref/Synchronized/api.ts +0 -249
- package/_src/Ref/Synchronized/constructors.ts +0 -12
- package/_src/Ref/Synchronized/definition.ts +0 -126
- package/_src/Ref/api/collect.ts +0 -19
- package/_src/Ref/api/dimap.ts +0 -115
- package/_src/Ref/api/filter.ts +0 -35
- package/_src/Ref/api/get.ts +0 -17
- package/_src/Ref/api/match.ts +0 -24
- package/_src/Ref/api/matchAll.ts +0 -23
- package/_src/Ref/api/modify.ts +0 -237
- package/_src/Ref/api/set.ts +0 -19
- package/_src/Ref/api.ts +0 -39
package/_mjs/IO/api.mjs
CHANGED
|
@@ -5,31 +5,32 @@ import * as tsplus_module_3 from "@fncts/base/data/Either/constructors";
|
|
|
5
5
|
import * as tsplus_module_4 from "@fncts/base/data/Maybe/destructors";
|
|
6
6
|
import * as tsplus_module_5 from "@fncts/base/data/Cause/api";
|
|
7
7
|
import * as tsplus_module_6 from "@fncts/base/data/Either/destructors";
|
|
8
|
-
import * as tsplus_module_7 from "@fncts/base/
|
|
9
|
-
import * as tsplus_module_8 from "@fncts/
|
|
10
|
-
import * as tsplus_module_9 from "@fncts/
|
|
11
|
-
import * as tsplus_module_10 from "@fncts/base/
|
|
12
|
-
import * as tsplus_module_11 from "@fncts/base/collection/
|
|
13
|
-
import * as tsplus_module_12 from "@fncts/base/collection/
|
|
14
|
-
import * as tsplus_module_13 from "@fncts/base/
|
|
15
|
-
import * as tsplus_module_14 from "@fncts/base/
|
|
16
|
-
import * as tsplus_module_15 from "@fncts/base/
|
|
17
|
-
import * as tsplus_module_16 from "@fncts/base/data/
|
|
18
|
-
import * as tsplus_module_17 from "@fncts/base/
|
|
19
|
-
import * as tsplus_module_18 from "@fncts/base/collection/immutable/
|
|
20
|
-
import * as tsplus_module_19 from "@fncts/base/collection/immutable/
|
|
21
|
-
import * as tsplus_module_20 from "@fncts/base/collection/immutable/ImmutableArray/
|
|
8
|
+
import * as tsplus_module_7 from "@fncts/base/util/predicates";
|
|
9
|
+
import * as tsplus_module_8 from "@fncts/base/data/Maybe/api";
|
|
10
|
+
import * as tsplus_module_9 from "@fncts/io/InterruptStatus/constructors";
|
|
11
|
+
import * as tsplus_module_10 from "@fncts/base/data/Exit/constructors";
|
|
12
|
+
import * as tsplus_module_11 from "@fncts/base/collection/immutable/Conc/api";
|
|
13
|
+
import * as tsplus_module_12 from "@fncts/base/collection/Iterable/api";
|
|
14
|
+
import * as tsplus_module_13 from "@fncts/base/collection/immutable/Conc/constructors";
|
|
15
|
+
import * as tsplus_module_14 from "@fncts/base/data/Maybe/definition";
|
|
16
|
+
import * as tsplus_module_15 from "@fncts/base/control/Eval/run";
|
|
17
|
+
import * as tsplus_module_16 from "@fncts/base/data/Exit/api";
|
|
18
|
+
import * as tsplus_module_17 from "@fncts/base/data/Trace/constructors";
|
|
19
|
+
import * as tsplus_module_18 from "@fncts/base/collection/immutable/Conc/api/empty";
|
|
20
|
+
import * as tsplus_module_19 from "@fncts/base/collection/immutable/List/api";
|
|
21
|
+
import * as tsplus_module_20 from "@fncts/base/collection/immutable/ImmutableArray/constructors";
|
|
22
|
+
import * as tsplus_module_21 from "@fncts/base/collection/immutable/ImmutableArray/api";
|
|
22
23
|
export const async = async_1;
|
|
23
24
|
export const asyncMaybe = asyncMaybe_1;
|
|
24
25
|
export const asyncInterrupt = asyncInterrupt_1;
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
26
|
+
export const apSecond = apSecond_1;
|
|
27
|
+
export const as = as_1;
|
|
27
28
|
export const asUnit = asUnit_1;
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
29
|
+
export const catchTagWith = catchTagWith_1;
|
|
30
|
+
export const catchAll = catchAll_1;
|
|
31
|
+
export const catchAllCause = catchAllCause_1;
|
|
32
|
+
export const flatMap = flatMap_1;
|
|
33
|
+
export const collectIO = collectIO_1;
|
|
33
34
|
export const defer = defer_1;
|
|
34
35
|
export const deferWith = deferWith_1;
|
|
35
36
|
export const descriptorWith = descriptorWith_1;
|
|
@@ -39,48 +40,48 @@ export const fail = fail_1;
|
|
|
39
40
|
export const failNow = failNow_1;
|
|
40
41
|
export const failCauseNow = failCauseNow_1;
|
|
41
42
|
export const failCause = failCause_1;
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const
|
|
45
|
-
export const
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
43
|
+
export const filter = filter_1;
|
|
44
|
+
export const filterMapWithIndex = filterMapWithIndex_1;
|
|
45
|
+
export const filterOrElse = filterOrElse_1;
|
|
46
|
+
export const foldLeft = foldLeft_1;
|
|
47
|
+
export const foreach = foreach_1;
|
|
48
|
+
export const foreachWithIndexDiscard = foreachWithIndexDiscard_1;
|
|
49
|
+
export const foreachDiscard = foreachDiscard_1;
|
|
49
50
|
export const forever = forever_1;
|
|
50
51
|
export const fromPromiseCatch = fromPromiseCatch_1;
|
|
51
|
-
export const
|
|
52
|
+
export const getOrFailWith = getOrFailWith_1;
|
|
52
53
|
export const haltNow = haltNow_1;
|
|
53
|
-
export const
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
59
|
-
export const
|
|
60
|
-
export const
|
|
61
|
-
export const
|
|
62
|
-
export const
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
54
|
+
export const ifIO = ifIO_1;
|
|
55
|
+
export const iterate = iterate_1;
|
|
56
|
+
export const loop = loop_1;
|
|
57
|
+
export const map = map_1;
|
|
58
|
+
export const mapError = mapError_1;
|
|
59
|
+
export const mapErrorCause = mapErrorCause_1;
|
|
60
|
+
export const matchCauseIO = matchCauseIO_1;
|
|
61
|
+
export const matchIO = matchIO_1;
|
|
62
|
+
export const match = match_1;
|
|
63
|
+
export const orElse = orElse_1;
|
|
64
|
+
export const orHaltWith = orHaltWith_1;
|
|
65
|
+
export const refineOrHaltWith = refineOrHaltWith_1;
|
|
66
|
+
export const rejectIO = rejectIO_1;
|
|
66
67
|
export const repeatN_ = repeatN_1;
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
68
|
+
export const repeatUntilIO = repeatUntilIO_1;
|
|
69
|
+
export const repeatWhileIO = repeatWhileIO_1;
|
|
70
|
+
export const retryUntilIO = retryUntilIO_1;
|
|
71
|
+
export const retryWhileIO = retryWhileIO_1;
|
|
71
72
|
export const sandbox = sandbox_1;
|
|
72
73
|
export const succeedNow = succeedNow_1;
|
|
73
74
|
export const succeed = succeed_1;
|
|
74
|
-
export const
|
|
75
|
+
export const summarized = summarized_1;
|
|
75
76
|
export const swap = swap_1;
|
|
76
|
-
export const
|
|
77
|
+
export const swapWith = swapWith_1;
|
|
77
78
|
export const tryCatch = tryCatch_1;
|
|
78
|
-
export const
|
|
79
|
-
export const
|
|
79
|
+
export const tryOrElse = tryOrElse_1;
|
|
80
|
+
export const unrefineWith = unrefineWith_1;
|
|
80
81
|
export const unsandbox = unsandbox_1;
|
|
81
82
|
export const withFiberContext = withFiberContext_1;
|
|
82
|
-
export const
|
|
83
|
-
export const
|
|
83
|
+
export const whenIO = whenIO_1;
|
|
84
|
+
export const zipWith = zipWith_1;
|
|
84
85
|
export const gen = gen_1;
|
|
85
86
|
import { identity, pipe, tuple } from "@fncts/base/data/function";
|
|
86
87
|
import { Stateful } from "@fncts/io/IO/definition";
|
|
@@ -108,7 +109,7 @@ function async_1(register, blockingOn = tsplus_module_1.none, __tsplusTrace) {
|
|
|
108
109
|
|
|
109
110
|
|
|
110
111
|
function asyncMaybe_1(register, blockingOn = tsplus_module_1.none, __tsplusTrace) {
|
|
111
|
-
return asyncInterrupt_1(cb => tsplus_module_4.
|
|
112
|
+
return asyncInterrupt_1(cb => tsplus_module_4.match(() => tsplus_module_3.left(unit_1), tsplus_module_3.right)(register(cb)), blockingOn, __tsplusTrace);
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
114
115
|
* Imports an asynchronous side-effect into an IO. The side-effect
|
|
@@ -137,38 +138,44 @@ function asyncInterrupt_1(register, blockingOn = tsplus_module_1.none, __tsplusT
|
|
|
137
138
|
* Attempts to convert defects into a failure, throwing away all information
|
|
138
139
|
* about the cause of the failure.
|
|
139
140
|
*
|
|
140
|
-
* @tsplus
|
|
141
|
+
* @tsplus pipeable fncts.io.IO absorbWith
|
|
141
142
|
*/
|
|
142
143
|
|
|
143
144
|
|
|
144
|
-
export function
|
|
145
|
-
return
|
|
145
|
+
export function absorbWith(f, __tsplusTrace) {
|
|
146
|
+
return ma => matchIO_1(cause => failNow_1(tsplus_module_5.squashWith(f)(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(sandbox_1(ma, __tsplusTrace));
|
|
146
147
|
}
|
|
147
148
|
/**
|
|
148
|
-
* @tsplus
|
|
149
|
-
* @tsplus operator fncts.io.IO <
|
|
149
|
+
* @tsplus pipeable fncts.io.IO apFirst
|
|
150
|
+
* @tsplus pipeable-operator fncts.io.IO <
|
|
150
151
|
*/
|
|
151
152
|
|
|
152
|
-
export function
|
|
153
|
-
return
|
|
153
|
+
export function apFirst(fb, __tsplusTrace) {
|
|
154
|
+
return self => {
|
|
155
|
+
return flatMap_1(a => map_1(() => a, __tsplusTrace)(fb), __tsplusTrace)(self);
|
|
156
|
+
};
|
|
154
157
|
}
|
|
155
158
|
/**
|
|
156
159
|
* Combine two effectful actions, keeping only the result of the second
|
|
157
160
|
*
|
|
158
|
-
* @tsplus
|
|
159
|
-
* @tsplus operator fncts.io.IO >
|
|
161
|
+
* @tsplus pipeable fncts.io.IO apSecond
|
|
162
|
+
* @tsplus pipeable-operator fncts.io.IO >
|
|
160
163
|
*/
|
|
161
164
|
|
|
162
|
-
function apSecond_1(
|
|
163
|
-
return
|
|
165
|
+
function apSecond_1(fb, __tsplusTrace) {
|
|
166
|
+
return self => {
|
|
167
|
+
return flatMap_1(() => fb, __tsplusTrace)(self);
|
|
168
|
+
};
|
|
164
169
|
}
|
|
165
170
|
/**
|
|
166
|
-
* @tsplus
|
|
171
|
+
* @tsplus pipeable fncts.io.IO as
|
|
167
172
|
*/
|
|
168
173
|
|
|
169
174
|
|
|
170
|
-
function as_1(
|
|
171
|
-
return
|
|
175
|
+
function as_1(b, __tsplusTrace) {
|
|
176
|
+
return self => {
|
|
177
|
+
return map_1(() => b(), __tsplusTrace)(self);
|
|
178
|
+
};
|
|
172
179
|
}
|
|
173
180
|
/**
|
|
174
181
|
* Maps the success value of this effect to an optional value.
|
|
@@ -178,7 +185,7 @@ function as_1(self, b, __tsplusTrace) {
|
|
|
178
185
|
|
|
179
186
|
|
|
180
187
|
export function asJust(ma, __tsplusTrace) {
|
|
181
|
-
return map_1(
|
|
188
|
+
return map_1(tsplus_module_2.just, __tsplusTrace)(ma);
|
|
182
189
|
}
|
|
183
190
|
/**
|
|
184
191
|
* Maps the error value of this IO to an optional value.
|
|
@@ -187,90 +194,102 @@ export function asJust(ma, __tsplusTrace) {
|
|
|
187
194
|
*/
|
|
188
195
|
|
|
189
196
|
export function asJustError(ma, __tsplusTrace) {
|
|
190
|
-
return mapError_1(
|
|
197
|
+
return mapError_1(tsplus_module_2.just, __tsplusTrace)(ma);
|
|
191
198
|
}
|
|
192
199
|
/**
|
|
193
200
|
* @tsplus getter fncts.io.IO asUnit
|
|
194
201
|
*/
|
|
195
202
|
|
|
196
203
|
function asUnit_1(self, __tsplusTrace) {
|
|
197
|
-
return as_1(
|
|
204
|
+
return as_1(() => undefined, __tsplusTrace)(self);
|
|
198
205
|
}
|
|
199
206
|
/**
|
|
200
207
|
* Returns an IO whose failure and success channels have been mapped by
|
|
201
208
|
* the specified pair of functions, `f` and `g`.
|
|
202
209
|
*
|
|
203
|
-
* @tsplus
|
|
210
|
+
* @tsplus pipeable fncts.io.IO bimap
|
|
204
211
|
*/
|
|
205
212
|
|
|
206
213
|
|
|
207
|
-
export function
|
|
208
|
-
return
|
|
214
|
+
export function bimap(f, g, __tsplusTrace) {
|
|
215
|
+
return self => {
|
|
216
|
+
return matchIO_1(e => failNow_1(f(e), __tsplusTrace), a => succeedNow_1(g(a), __tsplusTrace), __tsplusTrace)(self);
|
|
217
|
+
};
|
|
209
218
|
}
|
|
210
219
|
/**
|
|
211
220
|
* Returns an IO that effectfully "peeks" at the failure or success of
|
|
212
221
|
* this effect.
|
|
213
222
|
*
|
|
214
|
-
* @tsplus
|
|
223
|
+
* @tsplus pipeable fncts.io.IO bitap
|
|
215
224
|
*/
|
|
216
225
|
|
|
217
|
-
export function
|
|
218
|
-
return
|
|
226
|
+
export function bitap(onFailure, onSuccess, __tsplusTrace) {
|
|
227
|
+
return self => {
|
|
228
|
+
return matchCauseIO_1(cause => tsplus_module_6.match(e => flatMap_1(() => failCauseNow_1(cause, __tsplusTrace), __tsplusTrace)(onFailure(e)), () => failCauseNow_1(cause, __tsplusTrace))(tsplus_module_5.failureOrCause(cause)), a => apSecond_1(succeedNow_1(a, __tsplusTrace), __tsplusTrace)(onSuccess(a)), __tsplusTrace)(self);
|
|
229
|
+
};
|
|
219
230
|
}
|
|
220
231
|
/**
|
|
221
232
|
* Recovers from the specified error
|
|
222
233
|
*
|
|
223
|
-
* @tsplus
|
|
234
|
+
* @tsplus pipeable fncts.io.IO catch
|
|
224
235
|
*/
|
|
225
236
|
|
|
226
|
-
function
|
|
227
|
-
return
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
237
|
+
function catchTagWith_1(tag, k, f, __tsplusTrace) {
|
|
238
|
+
return ma => {
|
|
239
|
+
return catchAll_1(e => {
|
|
240
|
+
if (tsplus_module_7.isObject(e) && tag in e && e[tag] === k) {
|
|
241
|
+
return f(e);
|
|
242
|
+
}
|
|
231
243
|
|
|
232
|
-
|
|
233
|
-
|
|
244
|
+
return failNow_1(e, __tsplusTrace);
|
|
245
|
+
}, __tsplusTrace)(ma);
|
|
246
|
+
};
|
|
234
247
|
}
|
|
235
248
|
/**
|
|
236
249
|
* Recovers from all errors
|
|
237
250
|
*
|
|
238
|
-
* @tsplus
|
|
251
|
+
* @tsplus pipeable fncts.io.IO catchAll
|
|
239
252
|
*/
|
|
240
253
|
|
|
241
254
|
|
|
242
|
-
function catchAll_1(
|
|
243
|
-
return
|
|
255
|
+
function catchAll_1(f, __tsplusTrace) {
|
|
256
|
+
return ma => {
|
|
257
|
+
return matchIO_1(f, succeedNow_1, __tsplusTrace)(ma);
|
|
258
|
+
};
|
|
244
259
|
}
|
|
245
260
|
/**
|
|
246
261
|
*
|
|
247
262
|
* Recovers from all errors with provided cause.
|
|
248
263
|
*
|
|
249
|
-
* @tsplus
|
|
264
|
+
* @tsplus pipeable fncts.io.IO catchAllCause
|
|
250
265
|
*/
|
|
251
266
|
|
|
252
267
|
|
|
253
|
-
function catchAllCause_1(
|
|
254
|
-
return matchCauseIO_1(
|
|
268
|
+
function catchAllCause_1(f, __tsplusTrace) {
|
|
269
|
+
return ma => matchCauseIO_1(f, succeedNow_1, __tsplusTrace)(ma);
|
|
255
270
|
}
|
|
256
271
|
/**
|
|
257
272
|
* Recovers from some or all of the error cases.
|
|
258
273
|
*
|
|
259
|
-
* @tsplus
|
|
274
|
+
* @tsplus pipeable fncts.io.IO catchJust
|
|
260
275
|
*/
|
|
261
276
|
|
|
262
277
|
|
|
263
|
-
export function
|
|
264
|
-
return
|
|
278
|
+
export function catchJust(f, __tsplusTrace) {
|
|
279
|
+
return ma => {
|
|
280
|
+
return matchCauseIO_1(cause => tsplus_module_6.match(e => tsplus_module_8.getOrElse(() => failCauseNow_1(cause, __tsplusTrace))(f(e)), failCauseNow_1)(tsplus_module_5.failureOrCause(cause)), succeedNow_1, __tsplusTrace)(ma);
|
|
281
|
+
};
|
|
265
282
|
}
|
|
266
283
|
/**
|
|
267
284
|
* Recovers from some or all of the error cases with provided cause.
|
|
268
285
|
*
|
|
269
|
-
* @tsplus
|
|
286
|
+
* @tsplus pipeable fncts.io.IO catchJustCause
|
|
270
287
|
*/
|
|
271
288
|
|
|
272
|
-
export function
|
|
273
|
-
return
|
|
289
|
+
export function catchJustCause(f, __tsplusTrace) {
|
|
290
|
+
return ma => {
|
|
291
|
+
return matchCauseIO_1(cause => tsplus_module_8.getOrElse(() => failCauseNow_1(cause, __tsplusTrace))(f(cause)), succeedNow_1, __tsplusTrace)(ma);
|
|
292
|
+
};
|
|
274
293
|
}
|
|
275
294
|
/**
|
|
276
295
|
* Recovers from some or all of the defects with provided partial function.
|
|
@@ -280,53 +299,63 @@ export function catchJustCause_(ma, f, __tsplusTrace) {
|
|
|
280
299
|
* system, to transmit information on a defect for diagnostic or explanatory
|
|
281
300
|
* purposes.
|
|
282
301
|
*
|
|
283
|
-
* @tsplus
|
|
302
|
+
* @tsplus pipeable fncts.io.IO catchJustDefect
|
|
284
303
|
*/
|
|
285
304
|
|
|
286
|
-
export function
|
|
287
|
-
return
|
|
305
|
+
export function catchJustDefect(f, __tsplusTrace) {
|
|
306
|
+
return ma => {
|
|
307
|
+
return catchAll_1(a => a, __tsplusTrace)(unrefineWith_1(f, failNow_1, __tsplusTrace)(ma));
|
|
308
|
+
};
|
|
288
309
|
}
|
|
289
310
|
/**
|
|
290
311
|
* Recovers from the specified error
|
|
291
312
|
*
|
|
292
|
-
* @tsplus
|
|
313
|
+
* @tsplus pipeable IO catchTag
|
|
293
314
|
*/
|
|
294
315
|
|
|
295
|
-
export function
|
|
296
|
-
return
|
|
316
|
+
export function catchTag(k, f, __tsplusTrace) {
|
|
317
|
+
return ma => {
|
|
318
|
+
return catchTagWith_1("_tag", k, f, __tsplusTrace)(ma);
|
|
319
|
+
};
|
|
297
320
|
}
|
|
298
321
|
/**
|
|
299
322
|
* @tsplus getter fncts.io.IO cause
|
|
300
323
|
*/
|
|
301
324
|
|
|
302
325
|
export function cause(ma, __tsplusTrace) {
|
|
303
|
-
return matchCauseIO_1(
|
|
326
|
+
return matchCauseIO_1(succeedNow_1, () => succeedNow_1(tsplus_module_5.empty(), __tsplusTrace), __tsplusTrace)(ma);
|
|
304
327
|
}
|
|
305
328
|
/**
|
|
306
|
-
* @tsplus
|
|
329
|
+
* @tsplus pipeable fncts.io.IO causeAsError
|
|
307
330
|
*/
|
|
308
331
|
|
|
309
|
-
export function causeAsError(
|
|
310
|
-
return
|
|
332
|
+
export function causeAsError(__tsplusTrace) {
|
|
333
|
+
return ma => {
|
|
334
|
+
return matchCauseIO_1(failNow_1, succeedNow_1, __tsplusTrace)(ma);
|
|
335
|
+
};
|
|
311
336
|
}
|
|
312
337
|
/**
|
|
313
338
|
* Returns an IO that models the execution of this effect, followed by
|
|
314
339
|
* the passing of its value to the specified continuation function `f`,
|
|
315
340
|
* followed by the effect that it returns.
|
|
316
341
|
*
|
|
317
|
-
* @tsplus
|
|
342
|
+
* @tsplus pipeable fncts.io.IO flatMap
|
|
318
343
|
*/
|
|
319
344
|
|
|
320
|
-
function flatMap_1(
|
|
321
|
-
return
|
|
345
|
+
function flatMap_1(f, __tsplusTrace) {
|
|
346
|
+
return ma => {
|
|
347
|
+
return new Chain(ma, f, __tsplusTrace);
|
|
348
|
+
};
|
|
322
349
|
}
|
|
323
350
|
/**
|
|
324
|
-
* @tsplus
|
|
351
|
+
* @tsplus pipeable fncts.io.IO flatMapError
|
|
325
352
|
*/
|
|
326
353
|
|
|
327
354
|
|
|
328
|
-
export function
|
|
329
|
-
return
|
|
355
|
+
export function flatMapError(f, __tsplusTrace) {
|
|
356
|
+
return ma => {
|
|
357
|
+
return swapWith_1(effect => flatMap_1(f, __tsplusTrace)(effect), __tsplusTrace)(ma);
|
|
358
|
+
};
|
|
330
359
|
}
|
|
331
360
|
/**
|
|
332
361
|
* Checks the interrupt status, and produces the IO returned by the
|
|
@@ -336,29 +365,33 @@ export function flatMapError_(ma, f, __tsplusTrace) {
|
|
|
336
365
|
*/
|
|
337
366
|
|
|
338
367
|
export function checkInterruptible(f, __tsplusTrace) {
|
|
339
|
-
return withFiberContext_1(fiber => f(
|
|
368
|
+
return withFiberContext_1(fiber => f(tsplus_module_9.fromBoolean(fiber.unsafeIsInterruptible)), __tsplusTrace);
|
|
340
369
|
}
|
|
341
370
|
/**
|
|
342
|
-
* @tsplus
|
|
371
|
+
* @tsplus pipeable fncts.io.IO collect
|
|
343
372
|
*/
|
|
344
373
|
|
|
345
|
-
export function
|
|
346
|
-
return
|
|
374
|
+
export function collect(f, pf, __tsplusTrace) {
|
|
375
|
+
return ma => {
|
|
376
|
+
return collectIO_1(f, a => tsplus_module_8.map(succeedNow_1)(pf(a)), __tsplusTrace)(ma);
|
|
377
|
+
};
|
|
347
378
|
}
|
|
348
379
|
/**
|
|
349
|
-
* @tsplus
|
|
380
|
+
* @tsplus pipeable fncts.io.IO collectIO
|
|
350
381
|
*/
|
|
351
382
|
|
|
352
|
-
function collectIO_1(
|
|
353
|
-
return
|
|
383
|
+
function collectIO_1(f, pf, __tsplusTrace) {
|
|
384
|
+
return ma => {
|
|
385
|
+
return flatMap_1(a => tsplus_module_8.getOrElse(() => fail_1(f, __tsplusTrace))(pf(a)), __tsplusTrace)(ma);
|
|
386
|
+
};
|
|
354
387
|
}
|
|
355
388
|
/**
|
|
356
389
|
* @tsplus static fncts.io.IOOps condIO
|
|
357
390
|
*/
|
|
358
391
|
|
|
359
392
|
|
|
360
|
-
export function
|
|
361
|
-
return b ? onTrue : flatMap_1(
|
|
393
|
+
export function condIO(b, onTrue, onFalse, __tsplusTrace) {
|
|
394
|
+
return b ? onTrue : flatMap_1(failNow_1, __tsplusTrace)(onFalse);
|
|
362
395
|
}
|
|
363
396
|
/**
|
|
364
397
|
* Returns a lazily constructed effect, whose construction may itself require
|
|
@@ -398,7 +431,7 @@ export function deferTry(io, __tsplusTrace) {
|
|
|
398
431
|
try {
|
|
399
432
|
return io();
|
|
400
433
|
} catch (u) {
|
|
401
|
-
throw new IOError(
|
|
434
|
+
throw new IOError(tsplus_module_10.fail(u));
|
|
402
435
|
}
|
|
403
436
|
}, __tsplusTrace);
|
|
404
437
|
}
|
|
@@ -414,7 +447,7 @@ export function deferTryWith(io, __tsplusTrace) {
|
|
|
414
447
|
try {
|
|
415
448
|
return io(runtimeConfig, id);
|
|
416
449
|
} catch (u) {
|
|
417
|
-
throw new IOError(
|
|
450
|
+
throw new IOError(tsplus_module_10.fail(u));
|
|
418
451
|
}
|
|
419
452
|
}, __tsplusTrace);
|
|
420
453
|
}
|
|
@@ -432,7 +465,7 @@ export function deferTryCatch(io, onThrow, __tsplusTrace) {
|
|
|
432
465
|
try {
|
|
433
466
|
return io();
|
|
434
467
|
} catch (u) {
|
|
435
|
-
throw new IOError(
|
|
468
|
+
throw new IOError(tsplus_module_10.fail(onThrow(u)));
|
|
436
469
|
}
|
|
437
470
|
}, __tsplusTrace);
|
|
438
471
|
}
|
|
@@ -450,7 +483,7 @@ export function deferTryCatchWith(io, onThrow, __tsplusTrace) {
|
|
|
450
483
|
try {
|
|
451
484
|
return io(runtimeConfig, id);
|
|
452
485
|
} catch (u) {
|
|
453
|
-
throw new IOError(
|
|
486
|
+
throw new IOError(tsplus_module_10.fail(onThrow(u)));
|
|
454
487
|
}
|
|
455
488
|
}, __tsplusTrace);
|
|
456
489
|
}
|
|
@@ -458,7 +491,7 @@ export function deferTryCatchWith(io, onThrow, __tsplusTrace) {
|
|
|
458
491
|
* @tsplus static fncts.io.IOOps descriptor
|
|
459
492
|
*/
|
|
460
493
|
|
|
461
|
-
export const descriptor = /*#__PURE__*/descriptorWith_1(succeedNow_1, fileName_1 + ":
|
|
494
|
+
export const descriptor = /*#__PURE__*/descriptorWith_1(succeedNow_1, fileName_1 + ":528:41");
|
|
462
495
|
/**
|
|
463
496
|
* Constructs an IO based on information about the current fiber, such as
|
|
464
497
|
* its identity.
|
|
@@ -477,40 +510,46 @@ function descriptorWith_1(f, __tsplusTrace) {
|
|
|
477
510
|
|
|
478
511
|
|
|
479
512
|
function either_1(ma, __tsplusTrace) {
|
|
480
|
-
return match_1(
|
|
513
|
+
return match_1(tsplus_module_3.left, tsplus_module_3.right, __tsplusTrace)(ma);
|
|
481
514
|
}
|
|
482
515
|
/**
|
|
483
|
-
* @tsplus
|
|
516
|
+
* @tsplus pipeable fncts.io.IO ensuring
|
|
484
517
|
*/
|
|
485
518
|
|
|
486
519
|
|
|
487
|
-
export function
|
|
488
|
-
return
|
|
489
|
-
fiber
|
|
490
|
-
|
|
491
|
-
|
|
520
|
+
export function ensuring(finalizer, __tsplusTrace) {
|
|
521
|
+
return self => {
|
|
522
|
+
return withFiberContext_1(fiber => {
|
|
523
|
+
fiber.unsafeAddFinalizer(finalizer);
|
|
524
|
+
return self;
|
|
525
|
+
}, __tsplusTrace);
|
|
526
|
+
};
|
|
492
527
|
}
|
|
493
528
|
/**
|
|
494
|
-
* @tsplus
|
|
529
|
+
* @tsplus pipeable fncts.io.IO errorAsCause
|
|
495
530
|
*/
|
|
496
531
|
|
|
497
|
-
export function errorAsCause(
|
|
498
|
-
return
|
|
532
|
+
export function errorAsCause(__tsplusTrace) {
|
|
533
|
+
return ma => {
|
|
534
|
+
return matchIO_1(failCauseNow_1, succeedNow_1, __tsplusTrace)(ma);
|
|
535
|
+
};
|
|
499
536
|
}
|
|
500
537
|
/**
|
|
501
538
|
* @tsplus getter fncts.io.IO eventually
|
|
502
539
|
*/
|
|
503
540
|
|
|
504
541
|
function eventually_1(ma, __tsplusTrace) {
|
|
505
|
-
return orElse_1(
|
|
542
|
+
return orElse_1(() => eventually_1(ma, __tsplusTrace), __tsplusTrace)(ma);
|
|
506
543
|
}
|
|
507
544
|
/**
|
|
508
|
-
* @tsplus
|
|
545
|
+
* @tsplus pipeable fncts.io.IO extend
|
|
509
546
|
*/
|
|
510
547
|
|
|
511
548
|
|
|
512
|
-
export function
|
|
513
|
-
return
|
|
549
|
+
export function extend(f, __tsplusTrace) {
|
|
550
|
+
return wa => {
|
|
551
|
+
return matchIO_1(failNow_1, _ => succeed_1(() => f(wa), __tsplusTrace), __tsplusTrace)(wa);
|
|
552
|
+
};
|
|
514
553
|
}
|
|
515
554
|
/**
|
|
516
555
|
* @tsplus static fncts.io.IOOps fail
|
|
@@ -554,7 +593,7 @@ function failCause_1(cause, __tsplusTrace) {
|
|
|
554
593
|
*/
|
|
555
594
|
|
|
556
595
|
|
|
557
|
-
export const fiberId = /*#__PURE__*/descriptorWith_1(d => succeedNow_1(d.id, fileName_1 + ":
|
|
596
|
+
export const fiberId = /*#__PURE__*/descriptorWith_1(d => succeedNow_1(d.id, fileName_1 + ":623:89"), fileName_1 + ":623:68");
|
|
558
597
|
/**
|
|
559
598
|
* Filters the collection using the specified effectual predicate.
|
|
560
599
|
*
|
|
@@ -562,20 +601,20 @@ export const fiberId = /*#__PURE__*/descriptorWith_1(d => succeedNow_1(d.id, fil
|
|
|
562
601
|
*/
|
|
563
602
|
|
|
564
603
|
function filter_1(as, f, __tsplusTrace) {
|
|
565
|
-
return map_1(
|
|
604
|
+
return map_1(b => b.result(), __tsplusTrace)(tsplus_module_12.foldLeft(succeedNow_1(tsplus_module_11.builder(), __tsplusTrace), (eff, a) => zipWith_1(f(a), (builder, p) => {
|
|
566
605
|
if (p) {
|
|
567
606
|
builder.append(a);
|
|
568
607
|
}
|
|
569
608
|
|
|
570
609
|
return builder;
|
|
571
|
-
}, __tsplusTrace))
|
|
610
|
+
}, __tsplusTrace)(eff))(as));
|
|
572
611
|
}
|
|
573
612
|
/**
|
|
574
613
|
* @tsplus static fncts.io.IOOps filterMap
|
|
575
614
|
*/
|
|
576
615
|
|
|
577
616
|
|
|
578
|
-
export function
|
|
617
|
+
export function filterMap(as, f, __tsplusTrace) {
|
|
579
618
|
return filterMapWithIndex_1(as, (_, a) => f(a), __tsplusTrace);
|
|
580
619
|
}
|
|
581
620
|
/**
|
|
@@ -585,11 +624,11 @@ export function filterMap_(as, f, __tsplusTrace) {
|
|
|
585
624
|
function filterMapWithIndex_1(as, f, __tsplusTrace) {
|
|
586
625
|
return defer_1(() => {
|
|
587
626
|
const bs = [];
|
|
588
|
-
return as_1(foreachWithIndexDiscard_1(as, (i, a) => map_1(
|
|
589
|
-
if (
|
|
627
|
+
return as_1(() => tsplus_module_13.from(bs), __tsplusTrace)(foreachWithIndexDiscard_1(as, (i, a) => map_1(b => {
|
|
628
|
+
if (tsplus_module_14.isJust(b)) {
|
|
590
629
|
bs.push(b.value);
|
|
591
630
|
}
|
|
592
|
-
}, __tsplusTrace),
|
|
631
|
+
}, __tsplusTrace)(f(i, a)), __tsplusTrace));
|
|
593
632
|
}, __tsplusTrace);
|
|
594
633
|
}
|
|
595
634
|
/**
|
|
@@ -600,16 +639,20 @@ function filterMapWithIndex_1(as, f, __tsplusTrace) {
|
|
|
600
639
|
*/
|
|
601
640
|
|
|
602
641
|
|
|
603
|
-
export function
|
|
604
|
-
return filter_1(as, a => map_1(
|
|
642
|
+
export function filterNot(as, f, __tsplusTrace) {
|
|
643
|
+
return filter_1(as, a => map_1(b => !b, __tsplusTrace)(f(a)), __tsplusTrace);
|
|
605
644
|
}
|
|
606
645
|
|
|
607
|
-
function filterOrElse_1(
|
|
608
|
-
return
|
|
646
|
+
function filterOrElse_1(predicate, or, __tsplusTrace) {
|
|
647
|
+
return fa => {
|
|
648
|
+
return flatMap_1(a => predicate(a) ? succeedNow_1(a, __tsplusTrace) : defer_1(() => or(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
649
|
+
};
|
|
609
650
|
}
|
|
610
651
|
|
|
611
|
-
export function
|
|
612
|
-
return
|
|
652
|
+
export function filterOrFail(predicate, failWith, __tsplusTrace) {
|
|
653
|
+
return fa => {
|
|
654
|
+
return filterOrElse_1(predicate, a => failNow_1(failWith(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
655
|
+
};
|
|
613
656
|
}
|
|
614
657
|
/**
|
|
615
658
|
* Returns an `IO` that yields the value of the first
|
|
@@ -619,17 +662,19 @@ export function filterOrFail_(fa, predicate, failWith, __tsplusTrace) {
|
|
|
619
662
|
*/
|
|
620
663
|
|
|
621
664
|
export function firstSuccess(mas, __tsplusTrace) {
|
|
622
|
-
return mas.reduce((b, a) => orElse_1(
|
|
665
|
+
return mas.reduce((b, a) => orElse_1(() => a, __tsplusTrace)(b));
|
|
623
666
|
}
|
|
624
|
-
export function
|
|
625
|
-
return
|
|
667
|
+
export function filterOrHalt(predicate, haltWith, __tsplusTrace) {
|
|
668
|
+
return fa => {
|
|
669
|
+
return filterOrElse_1(predicate, a => haltNow_1(haltWith(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
670
|
+
};
|
|
626
671
|
}
|
|
627
672
|
/**
|
|
628
673
|
* @tsplus getter fncts.io.IO flatten
|
|
629
674
|
*/
|
|
630
675
|
|
|
631
676
|
export function flatten(self, __tsplusTrace) {
|
|
632
|
-
return flatMap_1(
|
|
677
|
+
return flatMap_1(identity, __tsplusTrace)(self);
|
|
633
678
|
}
|
|
634
679
|
/**
|
|
635
680
|
* Folds an `Iterable<A>` using an effectful function f, working sequentially from left to right.
|
|
@@ -638,7 +683,7 @@ export function flatten(self, __tsplusTrace) {
|
|
|
638
683
|
*/
|
|
639
684
|
|
|
640
685
|
function foldLeft_1(as, b, f, __tsplusTrace) {
|
|
641
|
-
return
|
|
686
|
+
return tsplus_module_12.foldLeft(succeedNow_1(b, __tsplusTrace), (acc, el) => flatMap_1(a => f(a, el), __tsplusTrace)(acc))(as);
|
|
642
687
|
}
|
|
643
688
|
/**
|
|
644
689
|
* Combines an array of `IO`s using a `Monoid`
|
|
@@ -647,10 +692,10 @@ function foldLeft_1(as, b, f, __tsplusTrace) {
|
|
|
647
692
|
*/
|
|
648
693
|
|
|
649
694
|
|
|
650
|
-
export function
|
|
695
|
+
export function foldMap(as, f,
|
|
651
696
|
/** @tsplus auto */
|
|
652
697
|
M) {
|
|
653
|
-
return foldLeft_1(as, M.nat, (m, a) => map_1(a
|
|
698
|
+
return foldLeft_1(as, M.nat, (m, a) => map_1(a => M.combine(m, f(a)), fileName_1 + ":796:48")(a), fileName_1 + ":796:21");
|
|
654
699
|
}
|
|
655
700
|
|
|
656
701
|
function foldRightLoop(iterator, b, f, __tsplusTrace) {
|
|
@@ -664,13 +709,13 @@ function foldRightLoop(iterator, b, f, __tsplusTrace) {
|
|
|
664
709
|
*/
|
|
665
710
|
|
|
666
711
|
|
|
667
|
-
export function
|
|
712
|
+
export function foldRight(as, b, f, __tsplusTrace) {
|
|
668
713
|
return foldRightLoop(as[Symbol.iterator](), b, f, __tsplusTrace);
|
|
669
714
|
}
|
|
670
715
|
|
|
671
716
|
function foreachWithIndexDiscardLoop(iterator, f, i = 0, __tsplusTrace) {
|
|
672
717
|
const next = iterator.next();
|
|
673
|
-
return next.done ? unit_1 : flatMap_1(
|
|
718
|
+
return next.done ? unit_1 : flatMap_1(() => foreachWithIndexDiscardLoop(iterator, f, i + 1, __tsplusTrace), __tsplusTrace)(f(i, next.value));
|
|
674
719
|
}
|
|
675
720
|
/**
|
|
676
721
|
* Applies the function `f` to each element of the `Iterable<A>` and
|
|
@@ -686,10 +731,10 @@ function foreachWithIndexDiscardLoop(iterator, f, i = 0, __tsplusTrace) {
|
|
|
686
731
|
function foreach_1(as, f, __tsplusTrace) {
|
|
687
732
|
return defer_1(() => {
|
|
688
733
|
const acc = [];
|
|
689
|
-
return as_1(foreachWithIndexDiscard_1(as, (_, a) => flatMap_1(
|
|
734
|
+
return as_1(() => tsplus_module_13.from(acc), __tsplusTrace)(foreachWithIndexDiscard_1(as, (_, a) => flatMap_1(b => {
|
|
690
735
|
acc.push(b);
|
|
691
736
|
return unit_1;
|
|
692
|
-
}, __tsplusTrace)
|
|
737
|
+
}, __tsplusTrace)(f(a)), __tsplusTrace));
|
|
693
738
|
}, __tsplusTrace);
|
|
694
739
|
}
|
|
695
740
|
/**
|
|
@@ -703,13 +748,13 @@ function foreach_1(as, f, __tsplusTrace) {
|
|
|
703
748
|
*/
|
|
704
749
|
|
|
705
750
|
|
|
706
|
-
export function
|
|
751
|
+
export function foreachWithIndex(as, f, __tsplusTrace) {
|
|
707
752
|
return defer_1(() => {
|
|
708
753
|
const acc = [];
|
|
709
|
-
return as_1(foreachWithIndexDiscard_1(as, (i, a) => flatMap_1(
|
|
754
|
+
return as_1(() => tsplus_module_13.from(acc), __tsplusTrace)(foreachWithIndexDiscard_1(as, (i, a) => flatMap_1(b => {
|
|
710
755
|
acc.push(b);
|
|
711
756
|
return unit_1;
|
|
712
|
-
}, __tsplusTrace),
|
|
757
|
+
}, __tsplusTrace)(f(i, a)), __tsplusTrace));
|
|
713
758
|
}, __tsplusTrace);
|
|
714
759
|
}
|
|
715
760
|
/**
|
|
@@ -738,7 +783,7 @@ function foreachDiscard_1(as, f, __tsplusTrace) {
|
|
|
738
783
|
|
|
739
784
|
|
|
740
785
|
function forever_1(ma, __tsplusTrace) {
|
|
741
|
-
return flatMap_1(
|
|
786
|
+
return flatMap_1(() => forever_1(ma, __tsplusTrace), __tsplusTrace)(apSecond_1(yieldNow_1, __tsplusTrace)(ma));
|
|
742
787
|
}
|
|
743
788
|
/**
|
|
744
789
|
* Returns an IO that forks this IO into its own separate fiber,
|
|
@@ -749,7 +794,7 @@ function forever_1(ma, __tsplusTrace) {
|
|
|
749
794
|
* new fiber, concurrently and without "blocking" the fiber executing other
|
|
750
795
|
* IOs. Using fibers can be tricky, so instead of using this method
|
|
751
796
|
* directly, consider other higher-level methods, such as `raceWith`,
|
|
752
|
-
* `
|
|
797
|
+
* `zipC`, and so forth.
|
|
753
798
|
*
|
|
754
799
|
* The fiber returned by this method has methods interrupt the fiber and to
|
|
755
800
|
* wait for it to finish executing the IO. See `Fiber` for more
|
|
@@ -776,25 +821,27 @@ export function fork(ma, __tsplusTrace) {
|
|
|
776
821
|
*/
|
|
777
822
|
|
|
778
823
|
export function fromEither(either, __tsplusTrace) {
|
|
779
|
-
return flatMap_1(
|
|
824
|
+
return flatMap_1(ea => tsplus_module_6.match(failNow_1, succeedNow_1)(ea), __tsplusTrace)(succeed_1(either, __tsplusTrace));
|
|
780
825
|
}
|
|
781
826
|
/**
|
|
782
827
|
* Lifts an `Either` into an `IO`
|
|
783
828
|
*
|
|
784
829
|
* @tsplus static fncts.io.IOOps fromEitherNow
|
|
830
|
+
* @tsplus getter fncts.Either toIO
|
|
785
831
|
*/
|
|
786
832
|
|
|
787
833
|
export function fromEitherNow(either, __tsplusTrace) {
|
|
788
|
-
return tsplus_module_6.
|
|
834
|
+
return tsplus_module_6.match(failNow_1, succeedNow_1)(either);
|
|
789
835
|
}
|
|
790
836
|
/**
|
|
791
837
|
* Lifts an `Eval` into an `IO`
|
|
792
838
|
*
|
|
793
839
|
* @tsplus static fncts.io.IOOps fromEval
|
|
840
|
+
* @tsplus getter fncts.Eval toIO
|
|
794
841
|
*/
|
|
795
842
|
|
|
796
843
|
export function fromEval(computation, __tsplusTrace) {
|
|
797
|
-
return succeed_1(() =>
|
|
844
|
+
return succeed_1(() => tsplus_module_15.run(computation), __tsplusTrace);
|
|
798
845
|
}
|
|
799
846
|
/**
|
|
800
847
|
* Creates a `IO` from an exit value
|
|
@@ -803,16 +850,17 @@ export function fromEval(computation, __tsplusTrace) {
|
|
|
803
850
|
*/
|
|
804
851
|
|
|
805
852
|
export function fromExit(exit, __tsplusTrace) {
|
|
806
|
-
return defer_1(() =>
|
|
853
|
+
return defer_1(() => tsplus_module_16.match(failCauseNow_1, succeedNow_1)(exit()), __tsplusTrace);
|
|
807
854
|
}
|
|
808
855
|
/**
|
|
809
856
|
* Creates a `IO` from an exit value
|
|
810
857
|
*
|
|
811
858
|
* @tsplus static fncts.io.IOOps fromExitNow
|
|
859
|
+
* @tsplus getter fncts.Exit toIO
|
|
812
860
|
*/
|
|
813
861
|
|
|
814
862
|
export function fromExitNow(exit, __tsplusTrace) {
|
|
815
|
-
return
|
|
863
|
+
return tsplus_module_16.match(failCauseNow_1, succeedNow_1)(exit);
|
|
816
864
|
}
|
|
817
865
|
/**
|
|
818
866
|
* Lifts a `Maybe` into an `IO` but preserves the error as a `Maybe` in the error channel, making it easier to compose
|
|
@@ -822,14 +870,15 @@ export function fromExitNow(exit, __tsplusTrace) {
|
|
|
822
870
|
*/
|
|
823
871
|
|
|
824
872
|
export function fromMaybe(maybe, __tsplusTrace) {
|
|
825
|
-
return flatMap_1(
|
|
873
|
+
return flatMap_1(m => tsplus_module_4.match(() => failNow_1(tsplus_module_2.nothing(), __tsplusTrace), succeedNow_1)(m), __tsplusTrace)(succeed_1(maybe, __tsplusTrace));
|
|
826
874
|
}
|
|
827
875
|
/**
|
|
828
876
|
* @tsplus static fncts.io.IOOps fromMaybeNow
|
|
877
|
+
* @tsplus getter fncts.Maybe toIO
|
|
829
878
|
*/
|
|
830
879
|
|
|
831
880
|
export function fromMaybeNow(maybe, __tsplusTrace) {
|
|
832
|
-
return tsplus_module_4.
|
|
881
|
+
return tsplus_module_4.match(() => failNow_1(tsplus_module_2.nothing(), __tsplusTrace), succeedNow_1)(maybe);
|
|
833
882
|
}
|
|
834
883
|
/**
|
|
835
884
|
* Create an IO that when executed will construct `promise` and wait for its result,
|
|
@@ -872,25 +921,29 @@ export function fromPromiseHalt(promise, __tsplusTrace) {
|
|
|
872
921
|
*/
|
|
873
922
|
|
|
874
923
|
export function get(ma, __tsplusTrace) {
|
|
875
|
-
return matchCauseIO_1(
|
|
924
|
+
return matchCauseIO_1(cause => failCauseNow_1(tsplus_module_5.map(tsplus_module_2.just)(cause), __tsplusTrace), ma => tsplus_module_4.match(() => failNow_1(tsplus_module_2.nothing(), __tsplusTrace), succeedNow_1)(ma), __tsplusTrace)(ma);
|
|
876
925
|
}
|
|
877
926
|
/**
|
|
878
927
|
* Extracts the optional value, or returns the given 'orElse'.
|
|
879
928
|
*
|
|
880
|
-
* @tsplus
|
|
929
|
+
* @tsplus pipeable fncts.io.IO getOrElse
|
|
881
930
|
*/
|
|
882
931
|
|
|
883
|
-
export function
|
|
884
|
-
return
|
|
932
|
+
export function getOrElse(orElse, __tsplusTrace) {
|
|
933
|
+
return ma => {
|
|
934
|
+
return map_1(ma => tsplus_module_8.getOrElse(orElse)(ma), __tsplusTrace)(ma);
|
|
935
|
+
};
|
|
885
936
|
}
|
|
886
937
|
/**
|
|
887
938
|
* Extracts the optional value, or executes the effect 'orElse'.
|
|
888
939
|
*
|
|
889
|
-
* @tsplus
|
|
940
|
+
* @tsplus pipeable fncts.io.IO getOrElseIO
|
|
890
941
|
*/
|
|
891
942
|
|
|
892
|
-
export function
|
|
893
|
-
return
|
|
943
|
+
export function getOrElseIO(orElse, __tsplusTrace) {
|
|
944
|
+
return ma => {
|
|
945
|
+
return flatMap_1(mab => tsplus_module_8.getOrElse(orElse)(tsplus_module_8.map(succeedNow_1)(mab)), __tsplusTrace)(ma);
|
|
946
|
+
};
|
|
894
947
|
}
|
|
895
948
|
/**
|
|
896
949
|
* Lifts a Maybe into an IO. If the option is `Nothing`, fail with `onNothing`.
|
|
@@ -899,7 +952,7 @@ export function getOrElseIO_(ma, orElse, __tsplusTrace) {
|
|
|
899
952
|
*/
|
|
900
953
|
|
|
901
954
|
function getOrFailWith_1(maybe, onNothing, __tsplusTrace) {
|
|
902
|
-
return defer_1(() => tsplus_module_4.
|
|
955
|
+
return defer_1(() => tsplus_module_4.match(() => fail_1(onNothing, __tsplusTrace), succeedNow_1)(maybe), __tsplusTrace);
|
|
903
956
|
}
|
|
904
957
|
/**
|
|
905
958
|
* Lifts a Maybe into a IO, if the Maybe is `Nothing` it fails with Unit.
|
|
@@ -920,7 +973,7 @@ export function getOrFailUnit(option, __tsplusTrace) {
|
|
|
920
973
|
*/
|
|
921
974
|
|
|
922
975
|
export function halt(e, __tsplusTrace) {
|
|
923
|
-
return failCause_1(() => tsplus_module_5.halt(e(),
|
|
976
|
+
return failCause_1(() => tsplus_module_5.halt(e(), tsplus_module_17.none), __tsplusTrace);
|
|
924
977
|
}
|
|
925
978
|
/**
|
|
926
979
|
* Creates an `IO` that halts with the specified defect
|
|
@@ -931,30 +984,32 @@ export function halt(e, __tsplusTrace) {
|
|
|
931
984
|
*/
|
|
932
985
|
|
|
933
986
|
function haltNow_1(e, __tsplusTrace) {
|
|
934
|
-
return failCauseNow_1(tsplus_module_5.halt(e,
|
|
987
|
+
return failCauseNow_1(tsplus_module_5.halt(e, tsplus_module_17.none), __tsplusTrace);
|
|
935
988
|
}
|
|
936
989
|
/**
|
|
937
|
-
* @tsplus
|
|
990
|
+
* @tsplus pipeable fncts.io.IO ifIO
|
|
938
991
|
*/
|
|
939
992
|
|
|
940
993
|
|
|
941
|
-
function ifIO_1(
|
|
942
|
-
return
|
|
994
|
+
function ifIO_1(onFalse, onTrue, __tsplusTrace) {
|
|
995
|
+
return self => {
|
|
996
|
+
return flatMap_1(b => b ? onTrue() : onFalse(), __tsplusTrace)(self);
|
|
997
|
+
};
|
|
943
998
|
}
|
|
944
999
|
/**
|
|
945
1000
|
* @tsplus static fncts.io.IOOps if
|
|
946
1001
|
*/
|
|
947
1002
|
|
|
948
1003
|
|
|
949
|
-
export function
|
|
950
|
-
return ifIO_1(
|
|
1004
|
+
export function cond(b, onTrue, onFalse, __tsplusTrace) {
|
|
1005
|
+
return ifIO_1(onTrue, onFalse, __tsplusTrace)(succeedNow_1(b, __tsplusTrace));
|
|
951
1006
|
}
|
|
952
1007
|
/**
|
|
953
1008
|
* @tsplus getter fncts.io.IO ignore
|
|
954
1009
|
*/
|
|
955
1010
|
|
|
956
1011
|
export function ignore(fa, __tsplusTrace) {
|
|
957
|
-
return match_1(
|
|
1012
|
+
return match_1(() => undefined, () => undefined, __tsplusTrace)(fa);
|
|
958
1013
|
}
|
|
959
1014
|
/**
|
|
960
1015
|
* Folds a `IO` to a boolean describing whether or not it is a failure
|
|
@@ -963,7 +1018,7 @@ export function ignore(fa, __tsplusTrace) {
|
|
|
963
1018
|
*/
|
|
964
1019
|
|
|
965
1020
|
export function isFailure(ma, __tsplusTrace) {
|
|
966
|
-
return match_1(
|
|
1021
|
+
return match_1(() => true, () => false, __tsplusTrace)(ma);
|
|
967
1022
|
}
|
|
968
1023
|
/**
|
|
969
1024
|
* Folds a `IO` to a boolean describing whether or not it is a success
|
|
@@ -972,7 +1027,7 @@ export function isFailure(ma, __tsplusTrace) {
|
|
|
972
1027
|
*/
|
|
973
1028
|
|
|
974
1029
|
export function isSuccess(ma, __tsplusTrace) {
|
|
975
|
-
return match_1(
|
|
1030
|
+
return match_1(() => false, () => true, __tsplusTrace)(ma);
|
|
976
1031
|
}
|
|
977
1032
|
/**
|
|
978
1033
|
* Iterates with the specified effectual function. The moral equivalent of:
|
|
@@ -991,7 +1046,7 @@ export function isSuccess(ma, __tsplusTrace) {
|
|
|
991
1046
|
*/
|
|
992
1047
|
|
|
993
1048
|
function iterate_1(initial, cont, body, __tsplusTrace) {
|
|
994
|
-
return cont(initial) ? flatMap_1(
|
|
1049
|
+
return cont(initial) ? flatMap_1(a => iterate_1(a, cont, body, __tsplusTrace), __tsplusTrace)(body(initial)) : succeedNow_1(initial, __tsplusTrace);
|
|
995
1050
|
}
|
|
996
1051
|
/**
|
|
997
1052
|
* Returns an IO with the value on the left part.
|
|
@@ -1001,7 +1056,7 @@ function iterate_1(initial, cont, body, __tsplusTrace) {
|
|
|
1001
1056
|
|
|
1002
1057
|
|
|
1003
1058
|
export function left(a, __tsplusTrace) {
|
|
1004
|
-
return flatMap_1(
|
|
1059
|
+
return flatMap_1(a => succeedNow_1(tsplus_module_3.left(a), __tsplusTrace), __tsplusTrace)(succeed_1(a, __tsplusTrace));
|
|
1005
1060
|
}
|
|
1006
1061
|
/**
|
|
1007
1062
|
* @tsplus static fncts.io.IOOps log
|
|
@@ -1031,9 +1086,9 @@ export function log(message, __tsplusTrace) {
|
|
|
1031
1086
|
|
|
1032
1087
|
function loop_1(initial, cont, inc, body, __tsplusTrace) {
|
|
1033
1088
|
if (cont(initial)) {
|
|
1034
|
-
return flatMap_1(
|
|
1089
|
+
return flatMap_1(a => map_1(as => tsplus_module_11.prepend(a)(as), __tsplusTrace)(loop_1(inc(initial), cont, inc, body, __tsplusTrace)), __tsplusTrace)(body(initial));
|
|
1035
1090
|
} else {
|
|
1036
|
-
return succeedNow_1(
|
|
1091
|
+
return succeedNow_1(tsplus_module_18.empty(), __tsplusTrace);
|
|
1037
1092
|
}
|
|
1038
1093
|
}
|
|
1039
1094
|
/**
|
|
@@ -1053,9 +1108,9 @@ function loop_1(initial, cont, inc, body, __tsplusTrace) {
|
|
|
1053
1108
|
*/
|
|
1054
1109
|
|
|
1055
1110
|
|
|
1056
|
-
export function
|
|
1111
|
+
export function loopUnit(initial, cont, inc, body, __tsplusTrace) {
|
|
1057
1112
|
if (cont(initial)) {
|
|
1058
|
-
return asUnit_1(flatMap_1(
|
|
1113
|
+
return asUnit_1(flatMap_1(() => loop_1(inc(initial), cont, inc, body, __tsplusTrace), __tsplusTrace)(body(initial)), __tsplusTrace);
|
|
1059
1114
|
} else {
|
|
1060
1115
|
return unit_1;
|
|
1061
1116
|
}
|
|
@@ -1063,11 +1118,13 @@ export function loopUnit_(initial, cont, inc, body, __tsplusTrace) {
|
|
|
1063
1118
|
/**
|
|
1064
1119
|
* Returns an `IO` whose success is mapped by the specified function `f`.
|
|
1065
1120
|
*
|
|
1066
|
-
* @tsplus
|
|
1121
|
+
* @tsplus pipeable fncts.io.IO map
|
|
1067
1122
|
*/
|
|
1068
1123
|
|
|
1069
|
-
function map_1(
|
|
1070
|
-
return
|
|
1124
|
+
function map_1(f, __tsplusTrace) {
|
|
1125
|
+
return fa => {
|
|
1126
|
+
return flatMap_1(a => succeedNow_1(f(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
1127
|
+
};
|
|
1071
1128
|
}
|
|
1072
1129
|
/**
|
|
1073
1130
|
* Map covariantly over the first argument.
|
|
@@ -1076,94 +1133,108 @@ function map_1(fa, f, __tsplusTrace) {
|
|
|
1076
1133
|
* function. This can be used to lift a "smaller" error into a "larger"
|
|
1077
1134
|
* error.
|
|
1078
1135
|
*
|
|
1079
|
-
* @tsplus
|
|
1136
|
+
* @tsplus pipeable fncts.io.IO mapError
|
|
1080
1137
|
*/
|
|
1081
1138
|
|
|
1082
1139
|
|
|
1083
|
-
function mapError_1(
|
|
1084
|
-
return
|
|
1140
|
+
function mapError_1(f, __tsplusTrace) {
|
|
1141
|
+
return fea => {
|
|
1142
|
+
return matchCauseIO_1(cause => failCauseNow_1(tsplus_module_5.map(f)(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(fea);
|
|
1143
|
+
};
|
|
1085
1144
|
}
|
|
1086
1145
|
/**
|
|
1087
1146
|
* @tsplus static fncts.io.IOOps mapTryCatch
|
|
1088
1147
|
*/
|
|
1089
1148
|
|
|
1090
1149
|
|
|
1091
|
-
export function
|
|
1092
|
-
return flatMap_1(
|
|
1150
|
+
export function mapTryCatch(io, f, onThrow, __tsplusTrace) {
|
|
1151
|
+
return flatMap_1(a => tryCatch_1(() => f(a), onThrow, __tsplusTrace), __tsplusTrace)(io);
|
|
1093
1152
|
}
|
|
1094
1153
|
/**
|
|
1095
1154
|
* Returns an IO with its full cause of failure mapped using
|
|
1096
1155
|
* the specified function. This can be used to transform errors
|
|
1097
1156
|
* while preserving the original structure of Cause.
|
|
1098
1157
|
*
|
|
1099
|
-
* @tsplus
|
|
1158
|
+
* @tsplus pipeable fncts.io.IO mapErrorCause
|
|
1100
1159
|
*/
|
|
1101
1160
|
|
|
1102
|
-
function mapErrorCause_1(
|
|
1103
|
-
return
|
|
1161
|
+
function mapErrorCause_1(f, __tsplusTrace) {
|
|
1162
|
+
return ma => {
|
|
1163
|
+
return matchCauseIO_1(cause => failCauseNow_1(f(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(ma);
|
|
1164
|
+
};
|
|
1104
1165
|
}
|
|
1105
1166
|
/**
|
|
1106
1167
|
* A more powerful version of `match_` that allows recovering from any kind of failure except interruptions.
|
|
1107
1168
|
*
|
|
1108
|
-
* @tsplus
|
|
1169
|
+
* @tsplus pipeable fncts.io.IO matchCause
|
|
1109
1170
|
*/
|
|
1110
1171
|
|
|
1111
1172
|
|
|
1112
|
-
export function
|
|
1113
|
-
return
|
|
1173
|
+
export function matchCause(onFailure, onSuccess, __tsplusTrace) {
|
|
1174
|
+
return self => {
|
|
1175
|
+
return matchCauseIO_1(cause => succeedNow_1(onFailure(cause), __tsplusTrace), a => succeedNow_1(onSuccess(a), __tsplusTrace), __tsplusTrace)(self);
|
|
1176
|
+
};
|
|
1114
1177
|
}
|
|
1115
1178
|
/**
|
|
1116
1179
|
* A more powerful version of `matchIO` that allows recovering from any kind of failure except interruptions.
|
|
1117
1180
|
*
|
|
1118
|
-
* @tsplus
|
|
1181
|
+
* @tsplus pipeable fncts.io.IO matchCauseIO
|
|
1119
1182
|
*/
|
|
1120
1183
|
|
|
1121
|
-
function matchCauseIO_1(
|
|
1122
|
-
return
|
|
1184
|
+
function matchCauseIO_1(onFailure, onSuccess, __tsplusTrace) {
|
|
1185
|
+
return self => {
|
|
1186
|
+
return new Match(self, onFailure, onSuccess, __tsplusTrace);
|
|
1187
|
+
};
|
|
1123
1188
|
}
|
|
1124
1189
|
/**
|
|
1125
|
-
* @tsplus
|
|
1190
|
+
* @tsplus pipeable fncts.io.IO matchIO
|
|
1126
1191
|
*/
|
|
1127
1192
|
|
|
1128
1193
|
|
|
1129
|
-
function matchIO_1(
|
|
1130
|
-
return
|
|
1194
|
+
function matchIO_1(onFailure, onSuccess, __tsplusTrace) {
|
|
1195
|
+
return self => {
|
|
1196
|
+
return matchCauseIO_1(cause => tsplus_module_6.match(onFailure, failCauseNow_1)(tsplus_module_5.failureOrCause(cause)), onSuccess, __tsplusTrace)(self);
|
|
1197
|
+
};
|
|
1131
1198
|
}
|
|
1132
1199
|
/**
|
|
1133
1200
|
* Folds over the failure value or the success value to yield an IO that
|
|
1134
1201
|
* does not fail, but succeeds with the value returned by the left or right
|
|
1135
1202
|
* function passed to `match_`.
|
|
1136
1203
|
*
|
|
1137
|
-
* @tsplus
|
|
1204
|
+
* @tsplus pipeable fncts.io.IO match
|
|
1138
1205
|
*/
|
|
1139
1206
|
|
|
1140
1207
|
|
|
1141
|
-
function match_1(
|
|
1142
|
-
return
|
|
1208
|
+
function match_1(onFailure, onSuccess, __tsplusTrace) {
|
|
1209
|
+
return self => {
|
|
1210
|
+
return matchIO_1(e => succeedNow_1(onFailure(e), __tsplusTrace), a => succeedNow_1(onSuccess(a), __tsplusTrace), __tsplusTrace)(self);
|
|
1211
|
+
};
|
|
1143
1212
|
}
|
|
1144
1213
|
/**
|
|
1145
1214
|
* A version of `matchIO` that gives you the (optional) trace of the error.
|
|
1146
1215
|
*
|
|
1147
|
-
* @tsplus
|
|
1216
|
+
* @tsplus pipeable fncts.io.IO matchTraceIO
|
|
1148
1217
|
*/
|
|
1149
1218
|
|
|
1150
1219
|
|
|
1151
|
-
export function
|
|
1152
|
-
return
|
|
1220
|
+
export function matchTraceIO(onFailure, onSuccess, __tsplusTrace) {
|
|
1221
|
+
return ma => {
|
|
1222
|
+
return matchCauseIO_1(cause => tsplus_module_6.match(([e, trace]) => onFailure(e, trace), failCauseNow_1)(tsplus_module_5.failureTraceOrCause(cause)), onSuccess, __tsplusTrace)(ma);
|
|
1223
|
+
};
|
|
1153
1224
|
}
|
|
1154
1225
|
/**
|
|
1155
1226
|
* @tsplus getter fncts.io.IO maybe
|
|
1156
1227
|
*/
|
|
1157
1228
|
|
|
1158
1229
|
export function maybe(io, __tsplusTrace) {
|
|
1159
|
-
return match_1(
|
|
1230
|
+
return match_1(() => tsplus_module_2.nothing(), tsplus_module_2.just, __tsplusTrace)(io);
|
|
1160
1231
|
}
|
|
1161
1232
|
/**
|
|
1162
1233
|
* @tsplus getter fncts.io.IO merge
|
|
1163
1234
|
*/
|
|
1164
1235
|
|
|
1165
1236
|
export function merge(io, __tsplusTrace) {
|
|
1166
|
-
return matchIO_1(
|
|
1237
|
+
return matchIO_1(succeedNow_1, succeedNow_1, __tsplusTrace)(io);
|
|
1167
1238
|
}
|
|
1168
1239
|
/**
|
|
1169
1240
|
* Merges an `Iterable<IO>` to a single IO, working sequentially.
|
|
@@ -1171,8 +1242,8 @@ export function merge(io, __tsplusTrace) {
|
|
|
1171
1242
|
* @tsplus static fncts.io.IOOps mergeAll
|
|
1172
1243
|
*/
|
|
1173
1244
|
|
|
1174
|
-
export function
|
|
1175
|
-
return
|
|
1245
|
+
export function mergeAll(fas, b, f, __tsplusTrace) {
|
|
1246
|
+
return tsplus_module_12.foldLeft(succeed_1(() => b, __tsplusTrace), (b, a) => zipWith_1(a, f, __tsplusTrace)(b))(fas);
|
|
1176
1247
|
}
|
|
1177
1248
|
/**
|
|
1178
1249
|
* Returns a `IO` that will never produce anything. The moral equivalent of
|
|
@@ -1186,8 +1257,8 @@ export const never = /*#__PURE__*/defer_1(() => asyncInterrupt_1(() => {
|
|
|
1186
1257
|
}, 60000);
|
|
1187
1258
|
return tsplus_module_3.left(succeed_1(() => {
|
|
1188
1259
|
clearInterval(interval);
|
|
1189
|
-
}, fileName_1 + ":
|
|
1190
|
-
}), fileName_1 + ":
|
|
1260
|
+
}, fileName_1 + ":1456:17"));
|
|
1261
|
+
}), fileName_1 + ":1450:39");
|
|
1191
1262
|
/**
|
|
1192
1263
|
* Converts an option on errors into an option on values.
|
|
1193
1264
|
*
|
|
@@ -1195,7 +1266,7 @@ export const never = /*#__PURE__*/defer_1(() => asyncInterrupt_1(() => {
|
|
|
1195
1266
|
*/
|
|
1196
1267
|
|
|
1197
1268
|
export function optional(ma, __tsplusTrace) {
|
|
1198
|
-
return matchIO_1(
|
|
1269
|
+
return matchIO_1(me => tsplus_module_4.match(() => succeedNow_1(tsplus_module_2.nothing(), __tsplusTrace), failNow_1)(me), a => succeedNow_1(tsplus_module_2.just(a), __tsplusTrace), __tsplusTrace)(ma);
|
|
1199
1270
|
}
|
|
1200
1271
|
/**
|
|
1201
1272
|
* Returns the logical disjunction of the `Boolean` value returned by this
|
|
@@ -1203,86 +1274,103 @@ export function optional(ma, __tsplusTrace) {
|
|
|
1203
1274
|
* operator has "short circuiting" behavior so if the value returned by this
|
|
1204
1275
|
* effect is true the specified effect will not be evaluated.
|
|
1205
1276
|
*
|
|
1206
|
-
* @tsplus
|
|
1277
|
+
* @tsplus pipeable fncts.io.IO or
|
|
1278
|
+
* @tsplus pipeable-operator fncts.io.IO ||
|
|
1207
1279
|
*/
|
|
1208
1280
|
|
|
1209
|
-
export function
|
|
1210
|
-
return
|
|
1281
|
+
export function or(mb, __tsplusTrace) {
|
|
1282
|
+
return ma => {
|
|
1283
|
+
return flatMap_1(b => b ? succeedNow_1(true, __tsplusTrace) : mb, __tsplusTrace)(ma);
|
|
1284
|
+
};
|
|
1211
1285
|
}
|
|
1212
1286
|
/**
|
|
1213
|
-
* @tsplus
|
|
1287
|
+
* @tsplus pipeable fncts.io.IO orElse
|
|
1214
1288
|
*/
|
|
1215
1289
|
|
|
1216
|
-
function orElse_1(
|
|
1217
|
-
return
|
|
1290
|
+
function orElse_1(that, __tsplusTrace) {
|
|
1291
|
+
return ma => {
|
|
1292
|
+
return tryOrElse_1(that, succeedNow_1, __tsplusTrace)(ma);
|
|
1293
|
+
};
|
|
1218
1294
|
}
|
|
1219
1295
|
/**
|
|
1220
|
-
* @tsplus
|
|
1296
|
+
* @tsplus pipeable fncts.io.IO orElseEither
|
|
1221
1297
|
*/
|
|
1222
1298
|
|
|
1223
1299
|
|
|
1224
|
-
export function
|
|
1225
|
-
return
|
|
1300
|
+
export function orElseEither(that, __tsplusTrace) {
|
|
1301
|
+
return self => {
|
|
1302
|
+
return tryOrElse_1(() => map_1(tsplus_module_3.right, __tsplusTrace)(that()), a => succeedNow_1(tsplus_module_3.left(a), __tsplusTrace), __tsplusTrace)(self);
|
|
1303
|
+
};
|
|
1226
1304
|
}
|
|
1227
1305
|
/**
|
|
1228
|
-
* @tsplus
|
|
1306
|
+
* @tsplus pipeable fncts.io.IO orElseFail
|
|
1229
1307
|
*/
|
|
1230
1308
|
|
|
1231
|
-
export function
|
|
1232
|
-
return
|
|
1309
|
+
export function orElseFail(e, __tsplusTrace) {
|
|
1310
|
+
return ma => {
|
|
1311
|
+
return orElse_1(() => fail_1(e, __tsplusTrace), __tsplusTrace)(ma);
|
|
1312
|
+
};
|
|
1233
1313
|
}
|
|
1234
1314
|
/**
|
|
1235
|
-
* @tsplus
|
|
1315
|
+
* @tsplus pipeable fncts.io.IO orElseMaybe
|
|
1236
1316
|
*/
|
|
1237
1317
|
|
|
1238
|
-
export function
|
|
1239
|
-
return
|
|
1318
|
+
export function orElseMaybe(that, __tsplusTrace) {
|
|
1319
|
+
return ma => {
|
|
1320
|
+
return catchAll_1(me => tsplus_module_4.match(that, e => fail_1(() => tsplus_module_2.just(e), __tsplusTrace))(me), __tsplusTrace)(ma);
|
|
1321
|
+
};
|
|
1240
1322
|
}
|
|
1241
1323
|
/**
|
|
1242
|
-
* @tsplus
|
|
1324
|
+
* @tsplus pipeable fncts.io.IO orElseSucceed
|
|
1243
1325
|
*/
|
|
1244
1326
|
|
|
1245
|
-
export function
|
|
1246
|
-
return
|
|
1327
|
+
export function orElseSucceed(a, __tsplusTrace) {
|
|
1328
|
+
return ma => {
|
|
1329
|
+
return orElse_1(() => succeed_1(a, __tsplusTrace), __tsplusTrace)(ma);
|
|
1330
|
+
};
|
|
1247
1331
|
}
|
|
1248
1332
|
/**
|
|
1249
1333
|
* @tsplus getter fncts.io.IO orHalt
|
|
1250
1334
|
*/
|
|
1251
1335
|
|
|
1252
1336
|
export function orHalt(ma, __tsplusTrace) {
|
|
1253
|
-
return orHaltWith_1(
|
|
1337
|
+
return orHaltWith_1(identity, __tsplusTrace)(ma);
|
|
1254
1338
|
}
|
|
1255
1339
|
/**
|
|
1256
1340
|
* @tsplus getter fncts.io.IO orHaltKeep
|
|
1257
1341
|
*/
|
|
1258
1342
|
|
|
1259
1343
|
export function orHaltKeep(ma, __tsplusTrace) {
|
|
1260
|
-
return matchCauseIO_1(
|
|
1344
|
+
return matchCauseIO_1(cause => failCauseNow_1(tsplus_module_5.flatMap(tsplus_module_5.halt)(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(ma);
|
|
1261
1345
|
}
|
|
1262
1346
|
/**
|
|
1263
|
-
* @tsplus
|
|
1347
|
+
* @tsplus pipeable fncts.io.IO orHaltWith
|
|
1264
1348
|
*/
|
|
1265
1349
|
|
|
1266
|
-
function orHaltWith_1(
|
|
1267
|
-
return
|
|
1350
|
+
function orHaltWith_1(f, __tsplusTrace) {
|
|
1351
|
+
return ma => {
|
|
1352
|
+
return matchIO_1(e => haltNow_1(f(e), __tsplusTrace), succeedNow_1, __tsplusTrace)(ma);
|
|
1353
|
+
};
|
|
1268
1354
|
}
|
|
1269
1355
|
/**
|
|
1270
1356
|
* Exposes all parallel errors in a single call
|
|
1271
1357
|
*
|
|
1272
|
-
* @tsplus
|
|
1358
|
+
* @tsplus pipeable fncts.io.IO concurrentErrors
|
|
1273
1359
|
*/
|
|
1274
1360
|
|
|
1275
1361
|
|
|
1276
|
-
export function
|
|
1277
|
-
return
|
|
1278
|
-
|
|
1362
|
+
export function concurrentErrors(__tsplusTrace) {
|
|
1363
|
+
return io => {
|
|
1364
|
+
return matchCauseIO_1(cause => {
|
|
1365
|
+
const f = tsplus_module_5.failures(cause);
|
|
1279
1366
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1367
|
+
if (tsplus_module_19.length(f) === 0) {
|
|
1368
|
+
return failCauseNow_1(cause, __tsplusTrace);
|
|
1369
|
+
} else {
|
|
1370
|
+
return failNow_1(f, __tsplusTrace);
|
|
1371
|
+
}
|
|
1372
|
+
}, succeedNow_1, __tsplusTrace)(io);
|
|
1373
|
+
};
|
|
1286
1374
|
}
|
|
1287
1375
|
/**
|
|
1288
1376
|
* Feeds elements of type `A` to a function `f` that returns an IO.
|
|
@@ -1291,112 +1379,134 @@ export function parallelErrors(io, __tsplusTrace) {
|
|
|
1291
1379
|
* @tsplus static fncts.io.IOOps partition
|
|
1292
1380
|
*/
|
|
1293
1381
|
|
|
1294
|
-
export function
|
|
1295
|
-
return map_1(foreach_1(as, a => either_1(f(a), __tsplusTrace), __tsplusTrace)
|
|
1382
|
+
export function partition(as, f, __tsplusTrace) {
|
|
1383
|
+
return map_1(c => tsplus_module_11.separate(c), __tsplusTrace)(foreach_1(as, a => either_1(f(a), __tsplusTrace), __tsplusTrace));
|
|
1296
1384
|
}
|
|
1297
1385
|
/**
|
|
1298
1386
|
* Keeps some of the errors, and terminates the fiber with the rest
|
|
1299
1387
|
*
|
|
1300
|
-
* @tsplus
|
|
1388
|
+
* @tsplus pipeable fncts.io.IO refineOrHalt
|
|
1301
1389
|
*/
|
|
1302
1390
|
|
|
1303
|
-
export function
|
|
1304
|
-
return
|
|
1391
|
+
export function refineOrHalt(pf, __tsplusTrace) {
|
|
1392
|
+
return fa => {
|
|
1393
|
+
return refineOrHaltWith_1(pf, identity, __tsplusTrace)(fa);
|
|
1394
|
+
};
|
|
1305
1395
|
}
|
|
1306
1396
|
/**
|
|
1307
1397
|
* Keeps some of the errors, and terminates the fiber with the rest, using
|
|
1308
1398
|
* the specified function to convert the `E` into a `Throwable`.
|
|
1309
1399
|
*
|
|
1310
|
-
* @tsplus
|
|
1400
|
+
* @tsplus pipeable fncts.io.IO refineOrHaltWith
|
|
1311
1401
|
*/
|
|
1312
1402
|
|
|
1313
|
-
function refineOrHaltWith_1(
|
|
1314
|
-
return
|
|
1403
|
+
function refineOrHaltWith_1(pf, f, __tsplusTrace) {
|
|
1404
|
+
return fa => {
|
|
1405
|
+
return catchAll_1(e => tsplus_module_4.match(() => haltNow_1(f(e), __tsplusTrace), failNow_1)(pf(e)), __tsplusTrace)(fa);
|
|
1406
|
+
};
|
|
1315
1407
|
}
|
|
1316
1408
|
/**
|
|
1317
1409
|
* Fail with the returned value if the partial function `pf` matches, otherwise
|
|
1318
1410
|
* continue with the held value.
|
|
1319
1411
|
*
|
|
1320
|
-
* @tsplus
|
|
1412
|
+
* @tsplus pipeable fncts.io.IO reject
|
|
1321
1413
|
*/
|
|
1322
1414
|
|
|
1323
1415
|
|
|
1324
|
-
export function
|
|
1325
|
-
return
|
|
1416
|
+
export function reject(pf, __tsplusTrace) {
|
|
1417
|
+
return fa => {
|
|
1418
|
+
return rejectIO_1(a => tsplus_module_8.map(failNow_1)(pf(a)), __tsplusTrace)(fa);
|
|
1419
|
+
};
|
|
1326
1420
|
}
|
|
1327
1421
|
/**
|
|
1328
1422
|
* Continue with the returned computation if the partial function `pf` matches,
|
|
1329
1423
|
* translating the successful match into a failure, otherwise continue with
|
|
1330
1424
|
* the held value.
|
|
1331
1425
|
*
|
|
1332
|
-
* @tsplus
|
|
1426
|
+
* @tsplus pipeable fncts.io.IO rejectIO
|
|
1333
1427
|
*/
|
|
1334
1428
|
|
|
1335
|
-
function rejectIO_1(
|
|
1336
|
-
return
|
|
1429
|
+
function rejectIO_1(pf, __tsplusTrace) {
|
|
1430
|
+
return fa => {
|
|
1431
|
+
return flatMap_1(a => tsplus_module_4.match(() => succeedNow_1(a, __tsplusTrace), io => flatMap_1(failNow_1, __tsplusTrace)(io))(pf(a)), __tsplusTrace)(fa);
|
|
1432
|
+
};
|
|
1337
1433
|
}
|
|
1338
1434
|
/**
|
|
1339
1435
|
* Repeats this effect the specified number of times.
|
|
1340
1436
|
*
|
|
1341
|
-
* @tsplus
|
|
1437
|
+
* @tsplus pipeable fncts.io.IO repeatN
|
|
1342
1438
|
*/
|
|
1343
1439
|
|
|
1344
1440
|
|
|
1345
|
-
function repeatN_1(
|
|
1346
|
-
return
|
|
1441
|
+
function repeatN_1(n, __tsplusTrace) {
|
|
1442
|
+
return ma => {
|
|
1443
|
+
return flatMap_1(a => n <= 0 ? succeed_1(() => a, __tsplusTrace) : repeatN_1(n - 1, __tsplusTrace)(ma), __tsplusTrace)(ma);
|
|
1444
|
+
};
|
|
1347
1445
|
}
|
|
1348
1446
|
/**
|
|
1349
1447
|
* Repeats this effect until its result satisfies the specified predicate.
|
|
1350
1448
|
*
|
|
1351
|
-
* @tsplus
|
|
1449
|
+
* @tsplus pipeable fncts.io.IO repeatUntil
|
|
1352
1450
|
*/
|
|
1353
1451
|
|
|
1354
1452
|
|
|
1355
|
-
export function
|
|
1356
|
-
return
|
|
1453
|
+
export function repeatUntil(f, __tsplusTrace) {
|
|
1454
|
+
return ma => {
|
|
1455
|
+
return repeatUntilIO_1(a => succeedNow_1(f(a), __tsplusTrace), __tsplusTrace)(ma);
|
|
1456
|
+
};
|
|
1357
1457
|
}
|
|
1358
1458
|
/**
|
|
1359
1459
|
* Repeats this effect until its error satisfies the specified effectful predicate.
|
|
1360
1460
|
*
|
|
1361
|
-
* @tsplus
|
|
1461
|
+
* @tsplus pipeable fncts.io.IO repeatUntilIO
|
|
1362
1462
|
*/
|
|
1363
1463
|
|
|
1364
|
-
function repeatUntilIO_1(
|
|
1365
|
-
return
|
|
1464
|
+
function repeatUntilIO_1(f, __tsplusTrace) {
|
|
1465
|
+
return ma => {
|
|
1466
|
+
return flatMap_1(a => flatMap_1(b => b ? succeed_1(() => a, __tsplusTrace) : repeatUntilIO_1(f, __tsplusTrace)(ma), __tsplusTrace)(f(a)), __tsplusTrace)(ma);
|
|
1467
|
+
};
|
|
1366
1468
|
}
|
|
1367
1469
|
/**
|
|
1368
1470
|
* Repeats this effect while its error satisfies the specified predicate.
|
|
1369
1471
|
*
|
|
1370
|
-
* @tsplus
|
|
1472
|
+
* @tsplus pipeable fncts.io.IO repeatWhile
|
|
1371
1473
|
*/
|
|
1372
1474
|
|
|
1373
1475
|
|
|
1374
|
-
export function
|
|
1375
|
-
return
|
|
1476
|
+
export function repeatWhile(f, __tsplusTrace) {
|
|
1477
|
+
return ma => {
|
|
1478
|
+
return repeatWhileIO_1(a => succeedNow_1(f(a), __tsplusTrace), __tsplusTrace)(ma);
|
|
1479
|
+
};
|
|
1376
1480
|
}
|
|
1377
1481
|
/**
|
|
1378
1482
|
* Repeats this effect while its error satisfies the specified effectful predicate.
|
|
1379
1483
|
*
|
|
1380
|
-
* @tsplus
|
|
1484
|
+
* @tsplus pipeable fncts.io.IO repeatWhileIO
|
|
1381
1485
|
*/
|
|
1382
1486
|
|
|
1383
|
-
function repeatWhileIO_1(
|
|
1384
|
-
return
|
|
1487
|
+
function repeatWhileIO_1(f, __tsplusTrace) {
|
|
1488
|
+
return ma => {
|
|
1489
|
+
return flatMap_1(a => flatMap_1(b => b ? repeatWhileIO_1(f, __tsplusTrace)(ma) : succeed_1(() => a, __tsplusTrace), __tsplusTrace)(f(a)), __tsplusTrace)(ma);
|
|
1490
|
+
};
|
|
1385
1491
|
}
|
|
1386
1492
|
/**
|
|
1387
|
-
* @tsplus
|
|
1493
|
+
* @tsplus pipeable fncts.io.IO replicate
|
|
1388
1494
|
*/
|
|
1389
1495
|
|
|
1390
1496
|
|
|
1391
|
-
export function
|
|
1392
|
-
return
|
|
1497
|
+
export function replicate(n, __tsplusTrace) {
|
|
1498
|
+
return self => {
|
|
1499
|
+
return tsplus_module_21.map(() => self)(tsplus_module_20.range(0, n));
|
|
1500
|
+
};
|
|
1393
1501
|
}
|
|
1394
1502
|
/**
|
|
1395
|
-
* @tsplus
|
|
1503
|
+
* @tsplus pipeable fncts.io.IO require
|
|
1396
1504
|
*/
|
|
1397
1505
|
|
|
1398
|
-
export function
|
|
1399
|
-
return
|
|
1506
|
+
export function require(error, __tsplusTrace) {
|
|
1507
|
+
return ma => {
|
|
1508
|
+
return flatMap_1(ma => tsplus_module_4.match(() => fail_1(error, __tsplusTrace), succeedNow_1)(ma), __tsplusTrace)(ma);
|
|
1509
|
+
};
|
|
1400
1510
|
}
|
|
1401
1511
|
/**
|
|
1402
1512
|
* Returns an IO that semantically runs the IO on a fiber,
|
|
@@ -1406,7 +1516,7 @@ export function require_(ma, error, __tsplusTrace) {
|
|
|
1406
1516
|
*/
|
|
1407
1517
|
|
|
1408
1518
|
export function result(ma, __tsplusTrace) {
|
|
1409
|
-
return matchCauseIO_1(
|
|
1519
|
+
return matchCauseIO_1(cause => succeedNow_1(tsplus_module_10.failCause(cause), __tsplusTrace), a => succeedNow_1(tsplus_module_10.succeed(a), __tsplusTrace), __tsplusTrace)(ma);
|
|
1410
1520
|
}
|
|
1411
1521
|
/**
|
|
1412
1522
|
* Recover from the unchecked failure of the `IO`. (opposite of `orHalt`)
|
|
@@ -1415,44 +1525,52 @@ export function result(ma, __tsplusTrace) {
|
|
|
1415
1525
|
*/
|
|
1416
1526
|
|
|
1417
1527
|
export function resurrect(io, __tsplusTrace) {
|
|
1418
|
-
return unrefineWith_1(
|
|
1528
|
+
return unrefineWith_1(tsplus_module_2.just, identity, __tsplusTrace)(io);
|
|
1419
1529
|
}
|
|
1420
1530
|
/**
|
|
1421
1531
|
* Retries this effect until its error satisfies the specified predicate.
|
|
1422
1532
|
*
|
|
1423
|
-
* @tsplus
|
|
1533
|
+
* @tsplus pipeable fncts.io.IO retryUntil
|
|
1424
1534
|
*/
|
|
1425
1535
|
|
|
1426
|
-
export function
|
|
1427
|
-
return
|
|
1536
|
+
export function retryUntil(f, __tsplusTrace) {
|
|
1537
|
+
return fa => {
|
|
1538
|
+
return retryUntilIO_1(e => succeedNow_1(f(e), __tsplusTrace), __tsplusTrace)(fa);
|
|
1539
|
+
};
|
|
1428
1540
|
}
|
|
1429
1541
|
/**
|
|
1430
1542
|
* Retries this effect until its error satisfies the specified effectful predicate.
|
|
1431
1543
|
*
|
|
1432
|
-
* @tsplus
|
|
1544
|
+
* @tsplus pipeable fncts.io.IO retryUntilIO
|
|
1433
1545
|
*/
|
|
1434
1546
|
|
|
1435
|
-
function retryUntilIO_1(
|
|
1436
|
-
return
|
|
1547
|
+
function retryUntilIO_1(f, __tsplusTrace) {
|
|
1548
|
+
return fa => {
|
|
1549
|
+
return catchAll_1(e => flatMap_1(b => b ? failNow_1(e, __tsplusTrace) : retryUntilIO_1(f, __tsplusTrace)(fa), __tsplusTrace)(f(e)), __tsplusTrace)(fa);
|
|
1550
|
+
};
|
|
1437
1551
|
}
|
|
1438
1552
|
/**
|
|
1439
1553
|
* Retries this effect while its error satisfies the specified predicate.
|
|
1440
1554
|
*
|
|
1441
|
-
* @tsplus
|
|
1555
|
+
* @tsplus pipeable fncts.io.IO retryWhile
|
|
1442
1556
|
*/
|
|
1443
1557
|
|
|
1444
1558
|
|
|
1445
|
-
export function
|
|
1446
|
-
return
|
|
1559
|
+
export function retryWhile(f, __tsplusTrace) {
|
|
1560
|
+
return fa => {
|
|
1561
|
+
return retryWhileIO_1(e => succeedNow_1(f(e), __tsplusTrace), __tsplusTrace)(fa);
|
|
1562
|
+
};
|
|
1447
1563
|
}
|
|
1448
1564
|
/**
|
|
1449
1565
|
* Retries this effect while its error satisfies the specified effectful predicate.
|
|
1450
1566
|
*
|
|
1451
|
-
* @tsplus
|
|
1567
|
+
* @tsplus pipeable fncts.io.IO retryWhileIO
|
|
1452
1568
|
*/
|
|
1453
1569
|
|
|
1454
|
-
function retryWhileIO_1(
|
|
1455
|
-
return
|
|
1570
|
+
function retryWhileIO_1(f, __tsplusTrace) {
|
|
1571
|
+
return fa => {
|
|
1572
|
+
return catchAll_1(e => flatMap_1(b => b ? retryWhileIO_1(f, __tsplusTrace)(fa) : fail_1(() => e, __tsplusTrace), __tsplusTrace)(f(e)), __tsplusTrace)(fa);
|
|
1573
|
+
};
|
|
1456
1574
|
}
|
|
1457
1575
|
/**
|
|
1458
1576
|
* Retrieves the runtimeConfig that this effect is running on.
|
|
@@ -1461,7 +1579,7 @@ function retryWhileIO_1(fa, f, __tsplusTrace) {
|
|
|
1461
1579
|
*/
|
|
1462
1580
|
|
|
1463
1581
|
|
|
1464
|
-
export const runtimeConfig = /*#__PURE__*/deferWith_1(runtimeConfig => succeedNow_1(runtimeConfig, fileName_1 + ":
|
|
1582
|
+
export const runtimeConfig = /*#__PURE__*/deferWith_1(runtimeConfig => succeedNow_1(runtimeConfig, fileName_1 + ":1787:95"), fileName_1 + ":1787:62");
|
|
1465
1583
|
/**
|
|
1466
1584
|
* Exposes the full cause of failure of this effect.
|
|
1467
1585
|
*
|
|
@@ -1469,15 +1587,17 @@ export const runtimeConfig = /*#__PURE__*/deferWith_1(runtimeConfig => succeedNo
|
|
|
1469
1587
|
*/
|
|
1470
1588
|
|
|
1471
1589
|
function sandbox_1(fa, __tsplusTrace) {
|
|
1472
|
-
return matchCauseIO_1(
|
|
1590
|
+
return matchCauseIO_1(failNow_1, succeedNow_1, __tsplusTrace)(fa);
|
|
1473
1591
|
}
|
|
1474
1592
|
/**
|
|
1475
|
-
* @tsplus
|
|
1593
|
+
* @tsplus pipeable fncts.io.IO sandboxWith
|
|
1476
1594
|
*/
|
|
1477
1595
|
|
|
1478
1596
|
|
|
1479
|
-
export function
|
|
1480
|
-
return
|
|
1597
|
+
export function sandboxWith(f, __tsplusTrace) {
|
|
1598
|
+
return ma => {
|
|
1599
|
+
return unsandbox_1(f(sandbox_1(ma, __tsplusTrace)), __tsplusTrace);
|
|
1600
|
+
};
|
|
1481
1601
|
}
|
|
1482
1602
|
/**
|
|
1483
1603
|
* Sets the runtime configuration to the specified value.
|
|
@@ -1524,17 +1644,19 @@ function succeed_1(effect, __tsplusTrace) {
|
|
|
1524
1644
|
return new Succeed(effect, __tsplusTrace);
|
|
1525
1645
|
}
|
|
1526
1646
|
/**
|
|
1527
|
-
* @tsplus
|
|
1647
|
+
* @tsplus pipeable fncts.io.IO summarized
|
|
1528
1648
|
*/
|
|
1529
1649
|
|
|
1530
1650
|
|
|
1531
|
-
function summarized_1(
|
|
1532
|
-
return
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1651
|
+
function summarized_1(summary, f, __tsplusTrace) {
|
|
1652
|
+
return ma => {
|
|
1653
|
+
return gen_1(function* (_) {
|
|
1654
|
+
const start = yield* _(summary, __tsplusTrace);
|
|
1655
|
+
const value = yield* _(ma, __tsplusTrace);
|
|
1656
|
+
const end = yield* _(summary, __tsplusTrace);
|
|
1657
|
+
return tuple(f(start, end), value);
|
|
1658
|
+
}, __tsplusTrace);
|
|
1659
|
+
};
|
|
1538
1660
|
}
|
|
1539
1661
|
/**
|
|
1540
1662
|
* Swaps the positions of a Bifunctor's arguments
|
|
@@ -1544,27 +1666,27 @@ function summarized_1(ma, summary, f, __tsplusTrace) {
|
|
|
1544
1666
|
|
|
1545
1667
|
|
|
1546
1668
|
function swap_1(pab, __tsplusTrace) {
|
|
1547
|
-
return matchIO_1(
|
|
1669
|
+
return matchIO_1(succeedNow_1, failNow_1, __tsplusTrace)(pab);
|
|
1548
1670
|
}
|
|
1549
1671
|
/**
|
|
1550
1672
|
* Swaps the error/value parameters, applies the function `f` and flips the parameters back
|
|
1551
1673
|
*
|
|
1552
|
-
* @tsplus
|
|
1674
|
+
* @tsplus pipeable fncts.io.IO swapWith
|
|
1553
1675
|
*/
|
|
1554
1676
|
|
|
1555
1677
|
|
|
1556
|
-
function swapWith_1(
|
|
1557
|
-
return swap_1(f(swap_1(fa, __tsplusTrace)), __tsplusTrace);
|
|
1678
|
+
function swapWith_1(f, __tsplusTrace) {
|
|
1679
|
+
return fa => swap_1(f(swap_1(fa, __tsplusTrace)), __tsplusTrace);
|
|
1558
1680
|
}
|
|
1559
1681
|
/**
|
|
1560
1682
|
* A more powerful variation of `timed` that allows specifying the clock.
|
|
1561
1683
|
*
|
|
1562
|
-
* @tsplus
|
|
1684
|
+
* @tsplus pipeable fncts.io.IO timedWith
|
|
1563
1685
|
*/
|
|
1564
1686
|
|
|
1565
1687
|
|
|
1566
|
-
export function
|
|
1567
|
-
return summarized_1(
|
|
1688
|
+
export function timedWith(msTime, __tsplusTrace) {
|
|
1689
|
+
return ma => summarized_1(msTime, (start, end) => end - start, __tsplusTrace)(ma);
|
|
1568
1690
|
}
|
|
1569
1691
|
/**
|
|
1570
1692
|
* Creates a `IO` that has succeeded with a pure value
|
|
@@ -1577,7 +1699,7 @@ function tryCatch_1(effect, onThrow, __tsplusTrace) {
|
|
|
1577
1699
|
try {
|
|
1578
1700
|
return effect();
|
|
1579
1701
|
} catch (u) {
|
|
1580
|
-
throw new IOError(
|
|
1702
|
+
throw new IOError(tsplus_module_10.fail(onThrow(u)));
|
|
1581
1703
|
}
|
|
1582
1704
|
}, __tsplusTrace);
|
|
1583
1705
|
}
|
|
@@ -1589,7 +1711,7 @@ function tryCatch_1(effect, onThrow, __tsplusTrace) {
|
|
|
1589
1711
|
|
|
1590
1712
|
|
|
1591
1713
|
export function absolve(ma, __tsplusTrace) {
|
|
1592
|
-
return flatMap_1(
|
|
1714
|
+
return flatMap_1(ea => tsplus_module_6.match(failNow_1, succeedNow_1)(ea), __tsplusTrace)(ma);
|
|
1593
1715
|
}
|
|
1594
1716
|
/**
|
|
1595
1717
|
* Composes computations in sequence, using the return value of one computation as input for the next
|
|
@@ -1597,54 +1719,62 @@ export function absolve(ma, __tsplusTrace) {
|
|
|
1597
1719
|
*
|
|
1598
1720
|
* Returns an IO that effectfully "peeks" at the success of this effect.
|
|
1599
1721
|
*
|
|
1600
|
-
* @tsplus
|
|
1722
|
+
* @tsplus pipeable fncts.io.IO tap
|
|
1601
1723
|
*/
|
|
1602
1724
|
|
|
1603
|
-
export function
|
|
1604
|
-
return
|
|
1725
|
+
export function tap(f, __tsplusTrace) {
|
|
1726
|
+
return self => {
|
|
1727
|
+
return flatMap_1(a => map_1(() => a, __tsplusTrace)(f(a)), __tsplusTrace)(self);
|
|
1728
|
+
};
|
|
1605
1729
|
}
|
|
1606
1730
|
/**
|
|
1607
1731
|
* Returns an IO that effectually "peeks" at the cause of the failure of
|
|
1608
1732
|
* this IO.
|
|
1609
1733
|
*
|
|
1610
|
-
* @tsplus
|
|
1734
|
+
* @tsplus pipeable fncts.io.IO tapCause
|
|
1611
1735
|
*/
|
|
1612
1736
|
|
|
1613
|
-
export function
|
|
1614
|
-
return
|
|
1737
|
+
export function tapCause(f, __tsplusTrace) {
|
|
1738
|
+
return ma => {
|
|
1739
|
+
return matchCauseIO_1(c => flatMap_1(() => failCauseNow_1(c, __tsplusTrace), __tsplusTrace)(f(c)), succeedNow_1, __tsplusTrace)(ma);
|
|
1740
|
+
};
|
|
1615
1741
|
}
|
|
1616
1742
|
/**
|
|
1617
1743
|
* Returns an IO that effectfully "peeks" at the failure of this effect.
|
|
1618
1744
|
*
|
|
1619
|
-
* @tsplus
|
|
1745
|
+
* @tsplus pipeable fncts.io.IO tapError
|
|
1620
1746
|
*/
|
|
1621
1747
|
|
|
1622
|
-
export function
|
|
1623
|
-
return matchCauseIO_1(
|
|
1748
|
+
export function tapError(f, __tsplusTrace) {
|
|
1749
|
+
return self => matchCauseIO_1(cause => tsplus_module_6.match(e => flatMap_1(() => failCauseNow_1(cause, __tsplusTrace), __tsplusTrace)(f(e)), _ => failCauseNow_1(cause, __tsplusTrace))(tsplus_module_5.failureOrCause(cause)), succeedNow_1, __tsplusTrace)(self);
|
|
1624
1750
|
}
|
|
1625
1751
|
/**
|
|
1626
1752
|
* Returns an effect that effectually "peeks" at the cause of the failure of
|
|
1627
1753
|
* this effect.
|
|
1628
1754
|
*
|
|
1629
|
-
* @tsplus
|
|
1755
|
+
* @tsplus pipeable fncts.io.IO tapErrorCause
|
|
1630
1756
|
*/
|
|
1631
1757
|
|
|
1632
|
-
export function
|
|
1633
|
-
return
|
|
1758
|
+
export function tapErrorCause(f, __tsplusTrace) {
|
|
1759
|
+
return self => {
|
|
1760
|
+
return matchCauseIO_1(cause => apSecond_1(failCauseNow_1(cause, __tsplusTrace), __tsplusTrace)(f(cause)), succeedNow_1, __tsplusTrace)(self);
|
|
1761
|
+
};
|
|
1634
1762
|
}
|
|
1635
1763
|
/**
|
|
1636
|
-
* @tsplus
|
|
1764
|
+
* @tsplus pipeable fncts.io.IO tryOrElse
|
|
1637
1765
|
*/
|
|
1638
1766
|
|
|
1639
|
-
function tryOrElse_1(
|
|
1640
|
-
return
|
|
1767
|
+
function tryOrElse_1(that, onSuccess, __tsplusTrace) {
|
|
1768
|
+
return ma => {
|
|
1769
|
+
return matchCauseIO_1(cause => tsplus_module_4.match(that, failCauseNow_1)(tsplus_module_5.keepDefects(cause)), onSuccess, __tsplusTrace)(ma);
|
|
1770
|
+
};
|
|
1641
1771
|
}
|
|
1642
1772
|
/**
|
|
1643
1773
|
* @tsplus static fncts.io.IOOps unit
|
|
1644
1774
|
*/
|
|
1645
1775
|
|
|
1646
1776
|
|
|
1647
|
-
const unit_1 = /*#__PURE__*/succeedNow_1(undefined, fileName_1 + ":
|
|
1777
|
+
const unit_1 = /*#__PURE__*/succeedNow_1(undefined, fileName_1 + ":1987:45");
|
|
1648
1778
|
export const unit = unit_1;
|
|
1649
1779
|
/**
|
|
1650
1780
|
* Converts an option on errors into an option on values.
|
|
@@ -1653,17 +1783,19 @@ export const unit = unit_1;
|
|
|
1653
1783
|
*/
|
|
1654
1784
|
|
|
1655
1785
|
export function unjust(self, __tsplusTrace) {
|
|
1656
|
-
return matchIO_1(
|
|
1786
|
+
return matchIO_1(e => tsplus_module_4.match(() => succeedNow_1(tsplus_module_2.nothing(), __tsplusTrace), failNow_1)(e), a => succeedNow_1(tsplus_module_2.just(a), __tsplusTrace), __tsplusTrace)(self);
|
|
1657
1787
|
}
|
|
1658
1788
|
/**
|
|
1659
1789
|
* Takes some fiber failures and converts them into errors, using the
|
|
1660
1790
|
* specified function to convert the `E` into an `E1 | E2`.
|
|
1661
1791
|
*
|
|
1662
|
-
* @tsplus
|
|
1792
|
+
* @tsplus pipeable fncts.io.IO unrefineWith
|
|
1663
1793
|
*/
|
|
1664
1794
|
|
|
1665
|
-
function unrefineWith_1(
|
|
1666
|
-
return
|
|
1795
|
+
function unrefineWith_1(pf, f, __tsplusTrace) {
|
|
1796
|
+
return fa => {
|
|
1797
|
+
return catchAllCause_1(cause => tsplus_module_4.match(() => failCauseNow_1(tsplus_module_5.map(f)(cause), __tsplusTrace), failNow_1)(tsplus_module_5.find(c => tsplus_module_5.isHalt(c) ? pf(c.value) : tsplus_module_2.nothing())(cause)), __tsplusTrace)(fa);
|
|
1798
|
+
};
|
|
1667
1799
|
}
|
|
1668
1800
|
/**
|
|
1669
1801
|
* The inverse operation `sandbox`
|
|
@@ -1673,7 +1805,7 @@ function unrefineWith_1(fa, pf, f, __tsplusTrace) {
|
|
|
1673
1805
|
|
|
1674
1806
|
|
|
1675
1807
|
function unsandbox_1(ma, __tsplusTrace) {
|
|
1676
|
-
return mapErrorCause_1(
|
|
1808
|
+
return mapErrorCause_1(cause => tsplus_module_5.flatten(cause), __tsplusTrace)(ma);
|
|
1677
1809
|
}
|
|
1678
1810
|
/**
|
|
1679
1811
|
* Updates the `FiberRef` values for the fiber running this effect using the
|
|
@@ -1703,20 +1835,24 @@ function withFiberContext_1(onState, __tsplusTrace) {
|
|
|
1703
1835
|
|
|
1704
1836
|
export const via = pipe;
|
|
1705
1837
|
/**
|
|
1706
|
-
* @tsplus
|
|
1838
|
+
* @tsplus pipeable fncts.io.IO when
|
|
1707
1839
|
*/
|
|
1708
1840
|
|
|
1709
|
-
export function
|
|
1710
|
-
return
|
|
1841
|
+
export function when(b, __tsplusTrace) {
|
|
1842
|
+
return ma => {
|
|
1843
|
+
return whenIO_1(succeed_1(b, __tsplusTrace), __tsplusTrace)(ma);
|
|
1844
|
+
};
|
|
1711
1845
|
}
|
|
1712
1846
|
/**
|
|
1713
1847
|
* The moral equivalent of `if (p) exp` when `p` has side-effects
|
|
1714
1848
|
*
|
|
1715
|
-
* @tsplus
|
|
1849
|
+
* @tsplus pipeable fncts.io.IO whenIO
|
|
1716
1850
|
*/
|
|
1717
1851
|
|
|
1718
|
-
function whenIO_1(
|
|
1719
|
-
return
|
|
1852
|
+
function whenIO_1(mb, __tsplusTrace) {
|
|
1853
|
+
return ma => {
|
|
1854
|
+
return flatMap_1(b => b ? asUnit_1(ma, __tsplusTrace) : unit_1, __tsplusTrace)(mb);
|
|
1855
|
+
};
|
|
1720
1856
|
}
|
|
1721
1857
|
/**
|
|
1722
1858
|
* Returns an effect that yields to the runtime system, starting on a fresh
|
|
@@ -1730,18 +1866,22 @@ function whenIO_1(ma, mb, __tsplusTrace) {
|
|
|
1730
1866
|
const yieldNow_1 = /*#__PURE__*/new Yield();
|
|
1731
1867
|
export const yieldNow = yieldNow_1;
|
|
1732
1868
|
/**
|
|
1733
|
-
* @tsplus
|
|
1869
|
+
* @tsplus pipeable fncts.io.IO zip
|
|
1734
1870
|
*/
|
|
1735
1871
|
|
|
1736
|
-
export function
|
|
1737
|
-
return
|
|
1872
|
+
export function zip(that, __tsplusTrace) {
|
|
1873
|
+
return self => {
|
|
1874
|
+
return zipWith_1(that, tuple, __tsplusTrace)(self);
|
|
1875
|
+
};
|
|
1738
1876
|
}
|
|
1739
1877
|
/**
|
|
1740
|
-
* @tsplus
|
|
1878
|
+
* @tsplus pipeable fncts.io.IO zipWith
|
|
1741
1879
|
*/
|
|
1742
1880
|
|
|
1743
|
-
function zipWith_1(
|
|
1744
|
-
return
|
|
1881
|
+
function zipWith_1(that, f, __tsplusTrace) {
|
|
1882
|
+
return self => {
|
|
1883
|
+
return flatMap_1(a => map_1(b => f(a, b), __tsplusTrace)(that), __tsplusTrace)(self);
|
|
1884
|
+
};
|
|
1745
1885
|
}
|
|
1746
1886
|
|
|
1747
1887
|
export class GenIO {
|
|
@@ -1760,22 +1900,6 @@ export class GenIO {
|
|
|
1760
1900
|
*/
|
|
1761
1901
|
|
|
1762
1902
|
export const __adapter = _ => {
|
|
1763
|
-
// if (Either.isEither(_)) {
|
|
1764
|
-
// return IO.fromEither(_);
|
|
1765
|
-
// }
|
|
1766
|
-
// if (Maybe.isMaybe(_)) {
|
|
1767
|
-
// return __
|
|
1768
|
-
// ? _._tag === "Nothing"
|
|
1769
|
-
// ? IO.failNow(__())
|
|
1770
|
-
// : IO.succeed(_.value)
|
|
1771
|
-
// : getOrFail(_);
|
|
1772
|
-
// }
|
|
1773
|
-
// if (isTag(_)) {
|
|
1774
|
-
// return service(_);
|
|
1775
|
-
// }
|
|
1776
|
-
// if (S.isSync(_)) {
|
|
1777
|
-
// return fromSync(_);
|
|
1778
|
-
// }
|
|
1779
1903
|
return _;
|
|
1780
1904
|
};
|
|
1781
1905
|
|
|
@@ -1803,7 +1927,7 @@ function gen_1(f, __tsplusTrace) {
|
|
|
1803
1927
|
return run(next);
|
|
1804
1928
|
};
|
|
1805
1929
|
|
|
1806
|
-
return flatMap_1(state.value.effect
|
|
1930
|
+
return flatMap_1(f, __tsplusTrace)(state.value.effect);
|
|
1807
1931
|
};
|
|
1808
1932
|
|
|
1809
1933
|
return run(state);
|