@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/_cjs/IO/api.cjs
CHANGED
|
@@ -5,53 +5,55 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.__adapter = exports.GenIO = void 0;
|
|
7
7
|
exports.absolve = absolve;
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
8
|
+
exports.absorbWith = absorbWith;
|
|
9
|
+
exports.apFirst = apFirst;
|
|
10
|
+
exports.as = exports.apSecond = void 0;
|
|
11
11
|
exports.asJust = asJust;
|
|
12
12
|
exports.asJustError = asJustError;
|
|
13
|
-
exports.asyncMaybe = exports.asyncInterrupt = exports.async = exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
13
|
+
exports.asyncMaybe = exports.asyncInterrupt = exports.async = exports.asUnit = void 0;
|
|
14
|
+
exports.bimap = bimap;
|
|
15
|
+
exports.bitap = bitap;
|
|
16
|
+
exports.catchAllCause = exports.catchAll = void 0;
|
|
17
|
+
exports.catchJust = catchJust;
|
|
18
|
+
exports.catchJustCause = catchJustCause;
|
|
19
|
+
exports.catchJustDefect = catchJustDefect;
|
|
20
|
+
exports.catchTag = catchTag;
|
|
21
|
+
exports.catchTagWith = void 0;
|
|
22
22
|
exports.cause = cause;
|
|
23
23
|
exports.causeAsError = causeAsError;
|
|
24
24
|
exports.checkInterruptible = checkInterruptible;
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
25
|
+
exports.collect = collect;
|
|
26
|
+
exports.collectIO = void 0;
|
|
27
|
+
exports.concurrentErrors = concurrentErrors;
|
|
28
|
+
exports.cond = cond;
|
|
29
|
+
exports.condIO = condIO;
|
|
28
30
|
exports.defer = void 0;
|
|
29
31
|
exports.deferTry = deferTry;
|
|
30
32
|
exports.deferTryCatch = deferTryCatch;
|
|
31
33
|
exports.deferTryCatchWith = deferTryCatchWith;
|
|
32
34
|
exports.deferTryWith = deferTryWith;
|
|
33
35
|
exports.either = exports.descriptorWith = exports.descriptor = exports.deferWith = void 0;
|
|
34
|
-
exports.
|
|
36
|
+
exports.ensuring = ensuring;
|
|
35
37
|
exports.errorAsCause = errorAsCause;
|
|
36
38
|
exports.eventually = void 0;
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
39
|
+
exports.extend = extend;
|
|
40
|
+
exports.filter = exports.fiberId = exports.failNow = exports.failCauseNow = exports.failCause = exports.fail = void 0;
|
|
41
|
+
exports.filterMap = filterMap;
|
|
42
|
+
exports.filterMapWithIndex = void 0;
|
|
43
|
+
exports.filterNot = filterNot;
|
|
44
|
+
exports.filterOrElse = void 0;
|
|
45
|
+
exports.filterOrFail = filterOrFail;
|
|
46
|
+
exports.filterOrHalt = filterOrHalt;
|
|
45
47
|
exports.firstSuccess = firstSuccess;
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
+
exports.flatMap = void 0;
|
|
49
|
+
exports.flatMapError = flatMapError;
|
|
48
50
|
exports.flatten = flatten;
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.forever = exports.
|
|
51
|
+
exports.foldLeft = void 0;
|
|
52
|
+
exports.foldMap = foldMap;
|
|
53
|
+
exports.foldRight = foldRight;
|
|
54
|
+
exports.foreachDiscard = exports.foreach = void 0;
|
|
55
|
+
exports.foreachWithIndex = foreachWithIndex;
|
|
56
|
+
exports.forever = exports.foreachWithIndexDiscard = void 0;
|
|
55
57
|
exports.fork = fork;
|
|
56
58
|
exports.fromEither = fromEither;
|
|
57
59
|
exports.fromEitherNow = fromEitherNow;
|
|
@@ -65,78 +67,76 @@ exports.fromPromiseCatch = void 0;
|
|
|
65
67
|
exports.fromPromiseHalt = fromPromiseHalt;
|
|
66
68
|
exports.gen = void 0;
|
|
67
69
|
exports.get = get;
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
70
|
+
exports.getOrElse = getOrElse;
|
|
71
|
+
exports.getOrElseIO = getOrElseIO;
|
|
70
72
|
exports.getOrFailUnit = getOrFailUnit;
|
|
71
|
-
exports.
|
|
73
|
+
exports.getOrFailWith = void 0;
|
|
72
74
|
exports.halt = halt;
|
|
73
|
-
exports.
|
|
74
|
-
exports.if_ = if_;
|
|
75
|
+
exports.ifIO = exports.haltNow = void 0;
|
|
75
76
|
exports.ignore = ignore;
|
|
76
77
|
exports.isFailure = isFailure;
|
|
77
78
|
exports.isSuccess = isSuccess;
|
|
78
|
-
exports.
|
|
79
|
+
exports.iterate = void 0;
|
|
79
80
|
exports.left = left;
|
|
80
81
|
exports.log = log;
|
|
81
|
-
exports.
|
|
82
|
-
exports.
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
82
|
+
exports.loop = void 0;
|
|
83
|
+
exports.loopUnit = loopUnit;
|
|
84
|
+
exports.mapErrorCause = exports.mapError = exports.map = void 0;
|
|
85
|
+
exports.mapTryCatch = mapTryCatch;
|
|
86
|
+
exports.match = void 0;
|
|
87
|
+
exports.matchCause = matchCause;
|
|
88
|
+
exports.matchIO = exports.matchCauseIO = void 0;
|
|
89
|
+
exports.matchTraceIO = matchTraceIO;
|
|
89
90
|
exports.maybe = maybe;
|
|
90
91
|
exports.merge = merge;
|
|
91
|
-
exports.
|
|
92
|
+
exports.mergeAll = mergeAll;
|
|
92
93
|
exports.never = void 0;
|
|
93
94
|
exports.optional = optional;
|
|
94
|
-
exports.
|
|
95
|
-
exports.
|
|
96
|
-
exports.
|
|
97
|
-
exports.
|
|
98
|
-
exports.
|
|
95
|
+
exports.or = or;
|
|
96
|
+
exports.orElse = void 0;
|
|
97
|
+
exports.orElseEither = orElseEither;
|
|
98
|
+
exports.orElseFail = orElseFail;
|
|
99
|
+
exports.orElseMaybe = orElseMaybe;
|
|
100
|
+
exports.orElseSucceed = orElseSucceed;
|
|
99
101
|
exports.orHalt = orHalt;
|
|
100
102
|
exports.orHaltKeep = orHaltKeep;
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.
|
|
112
|
-
exports.
|
|
113
|
-
exports.replicate_ = replicate_;
|
|
114
|
-
exports.require_ = require_;
|
|
103
|
+
exports.orHaltWith = void 0;
|
|
104
|
+
exports.partition = partition;
|
|
105
|
+
exports.refineOrHalt = refineOrHalt;
|
|
106
|
+
exports.refineOrHaltWith = void 0;
|
|
107
|
+
exports.reject = reject;
|
|
108
|
+
exports.repeatN_ = exports.rejectIO = void 0;
|
|
109
|
+
exports.repeatUntil = repeatUntil;
|
|
110
|
+
exports.repeatUntilIO = void 0;
|
|
111
|
+
exports.repeatWhile = repeatWhile;
|
|
112
|
+
exports.repeatWhileIO = void 0;
|
|
113
|
+
exports.replicate = replicate;
|
|
114
|
+
exports.require = _require;
|
|
115
115
|
exports.result = result;
|
|
116
116
|
exports.resurrect = resurrect;
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.sandboxWith_ = sandboxWith_;
|
|
117
|
+
exports.retryUntil = retryUntil;
|
|
118
|
+
exports.retryUntilIO = void 0;
|
|
119
|
+
exports.retryWhile = retryWhile;
|
|
120
|
+
exports.sandbox = exports.runtimeConfig = exports.retryWhileIO = void 0;
|
|
121
|
+
exports.sandboxWith = sandboxWith;
|
|
123
122
|
exports.sequenceIterable = sequenceIterable;
|
|
124
123
|
exports.sequenceIterableDiscard = sequenceIterableDiscard;
|
|
125
124
|
exports.setRuntimeConfig = setRuntimeConfig;
|
|
126
|
-
exports.
|
|
127
|
-
exports.
|
|
128
|
-
exports.
|
|
129
|
-
exports.
|
|
130
|
-
exports.
|
|
131
|
-
exports.
|
|
132
|
-
exports.unit = exports.
|
|
125
|
+
exports.swapWith = exports.swap = exports.summarized = exports.succeedNow = exports.succeed = void 0;
|
|
126
|
+
exports.tap = tap;
|
|
127
|
+
exports.tapCause = tapCause;
|
|
128
|
+
exports.tapError = tapError;
|
|
129
|
+
exports.tapErrorCause = tapErrorCause;
|
|
130
|
+
exports.timedWith = timedWith;
|
|
131
|
+
exports.unit = exports.tryOrElse = exports.tryCatch = void 0;
|
|
133
132
|
exports.unjust = unjust;
|
|
134
|
-
exports.unsandbox = exports.
|
|
133
|
+
exports.unsandbox = exports.unrefineWith = void 0;
|
|
135
134
|
exports.updateFiberRefs = updateFiberRefs;
|
|
136
|
-
exports.
|
|
137
|
-
exports.
|
|
138
|
-
exports.
|
|
139
|
-
exports.
|
|
135
|
+
exports.via = void 0;
|
|
136
|
+
exports.when = when;
|
|
137
|
+
exports.yieldNow = exports.withFiberContext = exports.whenIO = void 0;
|
|
138
|
+
exports.zip = zip;
|
|
139
|
+
exports.zipWith = void 0;
|
|
140
140
|
|
|
141
141
|
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/FiberId/constructors"));
|
|
142
142
|
|
|
@@ -150,33 +150,35 @@ var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require
|
|
|
150
150
|
|
|
151
151
|
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Either/destructors"));
|
|
152
152
|
|
|
153
|
-
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
153
|
+
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/util/predicates"));
|
|
154
154
|
|
|
155
|
-
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/
|
|
155
|
+
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/api"));
|
|
156
156
|
|
|
157
|
-
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/
|
|
157
|
+
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/io/InterruptStatus/constructors"));
|
|
158
158
|
|
|
159
|
-
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
159
|
+
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Exit/constructors"));
|
|
160
160
|
|
|
161
|
-
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/
|
|
161
|
+
var tsplus_module_11 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/Conc/api"));
|
|
162
162
|
|
|
163
|
-
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/
|
|
163
|
+
var tsplus_module_12 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/Iterable/api"));
|
|
164
164
|
|
|
165
|
-
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
165
|
+
var tsplus_module_13 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/Conc/constructors"));
|
|
166
166
|
|
|
167
|
-
var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
167
|
+
var tsplus_module_14 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/definition"));
|
|
168
168
|
|
|
169
|
-
var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
169
|
+
var tsplus_module_15 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/control/Eval/run"));
|
|
170
170
|
|
|
171
|
-
var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/
|
|
171
|
+
var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Exit/api"));
|
|
172
172
|
|
|
173
|
-
var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
173
|
+
var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Trace/constructors"));
|
|
174
174
|
|
|
175
|
-
var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/
|
|
175
|
+
var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/Conc/api/empty"));
|
|
176
176
|
|
|
177
|
-
var tsplus_module_19 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/
|
|
177
|
+
var tsplus_module_19 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/List/api"));
|
|
178
178
|
|
|
179
|
-
var tsplus_module_20 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/ImmutableArray/
|
|
179
|
+
var tsplus_module_20 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/ImmutableArray/constructors"));
|
|
180
|
+
|
|
181
|
+
var tsplus_module_21 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/ImmutableArray/api"));
|
|
180
182
|
|
|
181
183
|
var _function = /*#__PURE__*/require("@fncts/base/data/function");
|
|
182
184
|
|
|
@@ -193,22 +195,22 @@ const asyncMaybe = asyncMaybe_1;
|
|
|
193
195
|
exports.asyncMaybe = asyncMaybe;
|
|
194
196
|
const asyncInterrupt = asyncInterrupt_1;
|
|
195
197
|
exports.asyncInterrupt = asyncInterrupt;
|
|
196
|
-
const
|
|
197
|
-
exports.
|
|
198
|
-
const
|
|
199
|
-
exports.
|
|
198
|
+
const apSecond = apSecond_1;
|
|
199
|
+
exports.apSecond = apSecond;
|
|
200
|
+
const as = as_1;
|
|
201
|
+
exports.as = as;
|
|
200
202
|
const asUnit = asUnit_1;
|
|
201
203
|
exports.asUnit = asUnit;
|
|
202
|
-
const
|
|
203
|
-
exports.
|
|
204
|
-
const
|
|
205
|
-
exports.
|
|
206
|
-
const
|
|
207
|
-
exports.
|
|
208
|
-
const
|
|
209
|
-
exports.
|
|
210
|
-
const
|
|
211
|
-
exports.
|
|
204
|
+
const catchTagWith = catchTagWith_1;
|
|
205
|
+
exports.catchTagWith = catchTagWith;
|
|
206
|
+
const catchAll = catchAll_1;
|
|
207
|
+
exports.catchAll = catchAll;
|
|
208
|
+
const catchAllCause = catchAllCause_1;
|
|
209
|
+
exports.catchAllCause = catchAllCause;
|
|
210
|
+
const flatMap = flatMap_1;
|
|
211
|
+
exports.flatMap = flatMap;
|
|
212
|
+
const collectIO = collectIO_1;
|
|
213
|
+
exports.collectIO = collectIO;
|
|
212
214
|
const defer = defer_1;
|
|
213
215
|
exports.defer = defer;
|
|
214
216
|
const deferWith = deferWith_1;
|
|
@@ -227,90 +229,90 @@ const failCauseNow = failCauseNow_1;
|
|
|
227
229
|
exports.failCauseNow = failCauseNow;
|
|
228
230
|
const failCause = failCause_1;
|
|
229
231
|
exports.failCause = failCause;
|
|
230
|
-
const
|
|
231
|
-
exports.
|
|
232
|
-
const
|
|
233
|
-
exports.
|
|
234
|
-
const
|
|
235
|
-
exports.
|
|
236
|
-
const
|
|
237
|
-
exports.
|
|
238
|
-
const
|
|
239
|
-
exports.
|
|
240
|
-
const
|
|
241
|
-
exports.
|
|
242
|
-
const
|
|
243
|
-
exports.
|
|
232
|
+
const filter = filter_1;
|
|
233
|
+
exports.filter = filter;
|
|
234
|
+
const filterMapWithIndex = filterMapWithIndex_1;
|
|
235
|
+
exports.filterMapWithIndex = filterMapWithIndex;
|
|
236
|
+
const filterOrElse = filterOrElse_1;
|
|
237
|
+
exports.filterOrElse = filterOrElse;
|
|
238
|
+
const foldLeft = foldLeft_1;
|
|
239
|
+
exports.foldLeft = foldLeft;
|
|
240
|
+
const foreach = foreach_1;
|
|
241
|
+
exports.foreach = foreach;
|
|
242
|
+
const foreachWithIndexDiscard = foreachWithIndexDiscard_1;
|
|
243
|
+
exports.foreachWithIndexDiscard = foreachWithIndexDiscard;
|
|
244
|
+
const foreachDiscard = foreachDiscard_1;
|
|
245
|
+
exports.foreachDiscard = foreachDiscard;
|
|
244
246
|
const forever = forever_1;
|
|
245
247
|
exports.forever = forever;
|
|
246
248
|
const fromPromiseCatch = fromPromiseCatch_1;
|
|
247
249
|
exports.fromPromiseCatch = fromPromiseCatch;
|
|
248
|
-
const
|
|
249
|
-
exports.
|
|
250
|
+
const getOrFailWith = getOrFailWith_1;
|
|
251
|
+
exports.getOrFailWith = getOrFailWith;
|
|
250
252
|
const haltNow = haltNow_1;
|
|
251
253
|
exports.haltNow = haltNow;
|
|
252
|
-
const
|
|
253
|
-
exports.
|
|
254
|
-
const
|
|
255
|
-
exports.
|
|
256
|
-
const
|
|
257
|
-
exports.
|
|
258
|
-
const
|
|
259
|
-
exports.
|
|
260
|
-
const
|
|
261
|
-
exports.
|
|
262
|
-
const
|
|
263
|
-
exports.
|
|
264
|
-
const
|
|
265
|
-
exports.
|
|
266
|
-
const
|
|
267
|
-
exports.
|
|
268
|
-
const
|
|
269
|
-
exports.
|
|
270
|
-
const
|
|
271
|
-
exports.
|
|
272
|
-
const
|
|
273
|
-
exports.
|
|
274
|
-
const
|
|
275
|
-
exports.
|
|
276
|
-
const
|
|
277
|
-
exports.
|
|
254
|
+
const ifIO = ifIO_1;
|
|
255
|
+
exports.ifIO = ifIO;
|
|
256
|
+
const iterate = iterate_1;
|
|
257
|
+
exports.iterate = iterate;
|
|
258
|
+
const loop = loop_1;
|
|
259
|
+
exports.loop = loop;
|
|
260
|
+
const map = map_1;
|
|
261
|
+
exports.map = map;
|
|
262
|
+
const mapError = mapError_1;
|
|
263
|
+
exports.mapError = mapError;
|
|
264
|
+
const mapErrorCause = mapErrorCause_1;
|
|
265
|
+
exports.mapErrorCause = mapErrorCause;
|
|
266
|
+
const matchCauseIO = matchCauseIO_1;
|
|
267
|
+
exports.matchCauseIO = matchCauseIO;
|
|
268
|
+
const matchIO = matchIO_1;
|
|
269
|
+
exports.matchIO = matchIO;
|
|
270
|
+
const match = match_1;
|
|
271
|
+
exports.match = match;
|
|
272
|
+
const orElse = orElse_1;
|
|
273
|
+
exports.orElse = orElse;
|
|
274
|
+
const orHaltWith = orHaltWith_1;
|
|
275
|
+
exports.orHaltWith = orHaltWith;
|
|
276
|
+
const refineOrHaltWith = refineOrHaltWith_1;
|
|
277
|
+
exports.refineOrHaltWith = refineOrHaltWith;
|
|
278
|
+
const rejectIO = rejectIO_1;
|
|
279
|
+
exports.rejectIO = rejectIO;
|
|
278
280
|
const repeatN_ = repeatN_1;
|
|
279
281
|
exports.repeatN_ = repeatN_;
|
|
280
|
-
const
|
|
281
|
-
exports.
|
|
282
|
-
const
|
|
283
|
-
exports.
|
|
284
|
-
const
|
|
285
|
-
exports.
|
|
286
|
-
const
|
|
287
|
-
exports.
|
|
282
|
+
const repeatUntilIO = repeatUntilIO_1;
|
|
283
|
+
exports.repeatUntilIO = repeatUntilIO;
|
|
284
|
+
const repeatWhileIO = repeatWhileIO_1;
|
|
285
|
+
exports.repeatWhileIO = repeatWhileIO;
|
|
286
|
+
const retryUntilIO = retryUntilIO_1;
|
|
287
|
+
exports.retryUntilIO = retryUntilIO;
|
|
288
|
+
const retryWhileIO = retryWhileIO_1;
|
|
289
|
+
exports.retryWhileIO = retryWhileIO;
|
|
288
290
|
const sandbox = sandbox_1;
|
|
289
291
|
exports.sandbox = sandbox;
|
|
290
292
|
const succeedNow = succeedNow_1;
|
|
291
293
|
exports.succeedNow = succeedNow;
|
|
292
294
|
const succeed = succeed_1;
|
|
293
295
|
exports.succeed = succeed;
|
|
294
|
-
const
|
|
295
|
-
exports.
|
|
296
|
+
const summarized = summarized_1;
|
|
297
|
+
exports.summarized = summarized;
|
|
296
298
|
const swap = swap_1;
|
|
297
299
|
exports.swap = swap;
|
|
298
|
-
const
|
|
299
|
-
exports.
|
|
300
|
+
const swapWith = swapWith_1;
|
|
301
|
+
exports.swapWith = swapWith;
|
|
300
302
|
const tryCatch = tryCatch_1;
|
|
301
303
|
exports.tryCatch = tryCatch;
|
|
302
|
-
const
|
|
303
|
-
exports.
|
|
304
|
-
const
|
|
305
|
-
exports.
|
|
304
|
+
const tryOrElse = tryOrElse_1;
|
|
305
|
+
exports.tryOrElse = tryOrElse;
|
|
306
|
+
const unrefineWith = unrefineWith_1;
|
|
307
|
+
exports.unrefineWith = unrefineWith;
|
|
306
308
|
const unsandbox = unsandbox_1;
|
|
307
309
|
exports.unsandbox = unsandbox;
|
|
308
310
|
const withFiberContext = withFiberContext_1;
|
|
309
311
|
exports.withFiberContext = withFiberContext;
|
|
310
|
-
const
|
|
311
|
-
exports.
|
|
312
|
-
const
|
|
313
|
-
exports.
|
|
312
|
+
const whenIO = whenIO_1;
|
|
313
|
+
exports.whenIO = whenIO;
|
|
314
|
+
const zipWith = zipWith_1;
|
|
315
|
+
exports.zipWith = zipWith;
|
|
314
316
|
const gen = gen_1;
|
|
315
317
|
exports.gen = gen;
|
|
316
318
|
|
|
@@ -336,7 +338,7 @@ function async_1(register, blockingOn = tsplus_module_1.none, __tsplusTrace) {
|
|
|
336
338
|
|
|
337
339
|
|
|
338
340
|
function asyncMaybe_1(register, blockingOn = tsplus_module_1.none, __tsplusTrace) {
|
|
339
|
-
return asyncInterrupt_1(cb => tsplus_module_4.
|
|
341
|
+
return asyncInterrupt_1(cb => tsplus_module_4.match(() => tsplus_module_3.left(unit_1), tsplus_module_3.right)(register(cb)), blockingOn, __tsplusTrace);
|
|
340
342
|
}
|
|
341
343
|
/**
|
|
342
344
|
* Imports an asynchronous side-effect into an IO. The side-effect
|
|
@@ -365,40 +367,46 @@ function asyncInterrupt_1(register, blockingOn = tsplus_module_1.none, __tsplusT
|
|
|
365
367
|
* Attempts to convert defects into a failure, throwing away all information
|
|
366
368
|
* about the cause of the failure.
|
|
367
369
|
*
|
|
368
|
-
* @tsplus
|
|
370
|
+
* @tsplus pipeable fncts.io.IO absorbWith
|
|
369
371
|
*/
|
|
370
372
|
|
|
371
373
|
|
|
372
|
-
function
|
|
373
|
-
return
|
|
374
|
+
function absorbWith(f, __tsplusTrace) {
|
|
375
|
+
return ma => matchIO_1(cause => failNow_1(tsplus_module_5.squashWith(f)(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(sandbox_1(ma, __tsplusTrace));
|
|
374
376
|
}
|
|
375
377
|
/**
|
|
376
|
-
* @tsplus
|
|
377
|
-
* @tsplus operator fncts.io.IO <
|
|
378
|
+
* @tsplus pipeable fncts.io.IO apFirst
|
|
379
|
+
* @tsplus pipeable-operator fncts.io.IO <
|
|
378
380
|
*/
|
|
379
381
|
|
|
380
382
|
|
|
381
|
-
function
|
|
382
|
-
return
|
|
383
|
+
function apFirst(fb, __tsplusTrace) {
|
|
384
|
+
return self => {
|
|
385
|
+
return flatMap_1(a => map_1(() => a, __tsplusTrace)(fb), __tsplusTrace)(self);
|
|
386
|
+
};
|
|
383
387
|
}
|
|
384
388
|
/**
|
|
385
389
|
* Combine two effectful actions, keeping only the result of the second
|
|
386
390
|
*
|
|
387
|
-
* @tsplus
|
|
388
|
-
* @tsplus operator fncts.io.IO >
|
|
391
|
+
* @tsplus pipeable fncts.io.IO apSecond
|
|
392
|
+
* @tsplus pipeable-operator fncts.io.IO >
|
|
389
393
|
*/
|
|
390
394
|
|
|
391
395
|
|
|
392
|
-
function apSecond_1(
|
|
393
|
-
return
|
|
396
|
+
function apSecond_1(fb, __tsplusTrace) {
|
|
397
|
+
return self => {
|
|
398
|
+
return flatMap_1(() => fb, __tsplusTrace)(self);
|
|
399
|
+
};
|
|
394
400
|
}
|
|
395
401
|
/**
|
|
396
|
-
* @tsplus
|
|
402
|
+
* @tsplus pipeable fncts.io.IO as
|
|
397
403
|
*/
|
|
398
404
|
|
|
399
405
|
|
|
400
|
-
function as_1(
|
|
401
|
-
return
|
|
406
|
+
function as_1(b, __tsplusTrace) {
|
|
407
|
+
return self => {
|
|
408
|
+
return map_1(() => b(), __tsplusTrace)(self);
|
|
409
|
+
};
|
|
402
410
|
}
|
|
403
411
|
/**
|
|
404
412
|
* Maps the success value of this effect to an optional value.
|
|
@@ -408,7 +416,7 @@ function as_1(self, b, __tsplusTrace) {
|
|
|
408
416
|
|
|
409
417
|
|
|
410
418
|
function asJust(ma, __tsplusTrace) {
|
|
411
|
-
return map_1(
|
|
419
|
+
return map_1(tsplus_module_2.just, __tsplusTrace)(ma);
|
|
412
420
|
}
|
|
413
421
|
/**
|
|
414
422
|
* Maps the error value of this IO to an optional value.
|
|
@@ -418,7 +426,7 @@ function asJust(ma, __tsplusTrace) {
|
|
|
418
426
|
|
|
419
427
|
|
|
420
428
|
function asJustError(ma, __tsplusTrace) {
|
|
421
|
-
return mapError_1(
|
|
429
|
+
return mapError_1(tsplus_module_2.just, __tsplusTrace)(ma);
|
|
422
430
|
}
|
|
423
431
|
/**
|
|
424
432
|
* @tsplus getter fncts.io.IO asUnit
|
|
@@ -426,86 +434,98 @@ function asJustError(ma, __tsplusTrace) {
|
|
|
426
434
|
|
|
427
435
|
|
|
428
436
|
function asUnit_1(self, __tsplusTrace) {
|
|
429
|
-
return as_1(
|
|
437
|
+
return as_1(() => undefined, __tsplusTrace)(self);
|
|
430
438
|
}
|
|
431
439
|
/**
|
|
432
440
|
* Returns an IO whose failure and success channels have been mapped by
|
|
433
441
|
* the specified pair of functions, `f` and `g`.
|
|
434
442
|
*
|
|
435
|
-
* @tsplus
|
|
443
|
+
* @tsplus pipeable fncts.io.IO bimap
|
|
436
444
|
*/
|
|
437
445
|
|
|
438
446
|
|
|
439
|
-
function
|
|
440
|
-
return
|
|
447
|
+
function bimap(f, g, __tsplusTrace) {
|
|
448
|
+
return self => {
|
|
449
|
+
return matchIO_1(e => failNow_1(f(e), __tsplusTrace), a => succeedNow_1(g(a), __tsplusTrace), __tsplusTrace)(self);
|
|
450
|
+
};
|
|
441
451
|
}
|
|
442
452
|
/**
|
|
443
453
|
* Returns an IO that effectfully "peeks" at the failure or success of
|
|
444
454
|
* this effect.
|
|
445
455
|
*
|
|
446
|
-
* @tsplus
|
|
456
|
+
* @tsplus pipeable fncts.io.IO bitap
|
|
447
457
|
*/
|
|
448
458
|
|
|
449
459
|
|
|
450
|
-
function
|
|
451
|
-
return
|
|
460
|
+
function bitap(onFailure, onSuccess, __tsplusTrace) {
|
|
461
|
+
return self => {
|
|
462
|
+
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);
|
|
463
|
+
};
|
|
452
464
|
}
|
|
453
465
|
/**
|
|
454
466
|
* Recovers from the specified error
|
|
455
467
|
*
|
|
456
|
-
* @tsplus
|
|
468
|
+
* @tsplus pipeable fncts.io.IO catch
|
|
457
469
|
*/
|
|
458
470
|
|
|
459
471
|
|
|
460
|
-
function
|
|
461
|
-
return
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
472
|
+
function catchTagWith_1(tag, k, f, __tsplusTrace) {
|
|
473
|
+
return ma => {
|
|
474
|
+
return catchAll_1(e => {
|
|
475
|
+
if (tsplus_module_7.isObject(e) && tag in e && e[tag] === k) {
|
|
476
|
+
return f(e);
|
|
477
|
+
}
|
|
465
478
|
|
|
466
|
-
|
|
467
|
-
|
|
479
|
+
return failNow_1(e, __tsplusTrace);
|
|
480
|
+
}, __tsplusTrace)(ma);
|
|
481
|
+
};
|
|
468
482
|
}
|
|
469
483
|
/**
|
|
470
484
|
* Recovers from all errors
|
|
471
485
|
*
|
|
472
|
-
* @tsplus
|
|
486
|
+
* @tsplus pipeable fncts.io.IO catchAll
|
|
473
487
|
*/
|
|
474
488
|
|
|
475
489
|
|
|
476
|
-
function catchAll_1(
|
|
477
|
-
return
|
|
490
|
+
function catchAll_1(f, __tsplusTrace) {
|
|
491
|
+
return ma => {
|
|
492
|
+
return matchIO_1(f, succeedNow_1, __tsplusTrace)(ma);
|
|
493
|
+
};
|
|
478
494
|
}
|
|
479
495
|
/**
|
|
480
496
|
*
|
|
481
497
|
* Recovers from all errors with provided cause.
|
|
482
498
|
*
|
|
483
|
-
* @tsplus
|
|
499
|
+
* @tsplus pipeable fncts.io.IO catchAllCause
|
|
484
500
|
*/
|
|
485
501
|
|
|
486
502
|
|
|
487
|
-
function catchAllCause_1(
|
|
488
|
-
return matchCauseIO_1(
|
|
503
|
+
function catchAllCause_1(f, __tsplusTrace) {
|
|
504
|
+
return ma => matchCauseIO_1(f, succeedNow_1, __tsplusTrace)(ma);
|
|
489
505
|
}
|
|
490
506
|
/**
|
|
491
507
|
* Recovers from some or all of the error cases.
|
|
492
508
|
*
|
|
493
|
-
* @tsplus
|
|
509
|
+
* @tsplus pipeable fncts.io.IO catchJust
|
|
494
510
|
*/
|
|
495
511
|
|
|
496
512
|
|
|
497
|
-
function
|
|
498
|
-
return
|
|
513
|
+
function catchJust(f, __tsplusTrace) {
|
|
514
|
+
return ma => {
|
|
515
|
+
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);
|
|
516
|
+
};
|
|
499
517
|
}
|
|
500
518
|
/**
|
|
501
519
|
* Recovers from some or all of the error cases with provided cause.
|
|
502
520
|
*
|
|
503
|
-
* @tsplus
|
|
521
|
+
* @tsplus pipeable fncts.io.IO catchJustCause
|
|
504
522
|
*/
|
|
505
523
|
|
|
506
524
|
|
|
507
|
-
function
|
|
508
|
-
return
|
|
525
|
+
function catchJustCause(f, __tsplusTrace) {
|
|
526
|
+
return ma => {
|
|
527
|
+
return matchCauseIO_1(cause => tsplus_module_8.getOrElse(() => failCauseNow_1(cause, __tsplusTrace))(f(cause)), succeedNow_1, __tsplusTrace)(ma);
|
|
528
|
+
};
|
|
509
529
|
}
|
|
510
530
|
/**
|
|
511
531
|
* Recovers from some or all of the defects with provided partial function.
|
|
@@ -515,22 +535,26 @@ function catchJustCause_(ma, f, __tsplusTrace) {
|
|
|
515
535
|
* system, to transmit information on a defect for diagnostic or explanatory
|
|
516
536
|
* purposes.
|
|
517
537
|
*
|
|
518
|
-
* @tsplus
|
|
538
|
+
* @tsplus pipeable fncts.io.IO catchJustDefect
|
|
519
539
|
*/
|
|
520
540
|
|
|
521
541
|
|
|
522
|
-
function
|
|
523
|
-
return
|
|
542
|
+
function catchJustDefect(f, __tsplusTrace) {
|
|
543
|
+
return ma => {
|
|
544
|
+
return catchAll_1(a => a, __tsplusTrace)(unrefineWith_1(f, failNow_1, __tsplusTrace)(ma));
|
|
545
|
+
};
|
|
524
546
|
}
|
|
525
547
|
/**
|
|
526
548
|
* Recovers from the specified error
|
|
527
549
|
*
|
|
528
|
-
* @tsplus
|
|
550
|
+
* @tsplus pipeable IO catchTag
|
|
529
551
|
*/
|
|
530
552
|
|
|
531
553
|
|
|
532
|
-
function
|
|
533
|
-
return
|
|
554
|
+
function catchTag(k, f, __tsplusTrace) {
|
|
555
|
+
return ma => {
|
|
556
|
+
return catchTagWith_1("_tag", k, f, __tsplusTrace)(ma);
|
|
557
|
+
};
|
|
534
558
|
}
|
|
535
559
|
/**
|
|
536
560
|
* @tsplus getter fncts.io.IO cause
|
|
@@ -538,35 +562,41 @@ function catchTag_(ma, k, f, __tsplusTrace) {
|
|
|
538
562
|
|
|
539
563
|
|
|
540
564
|
function cause(ma, __tsplusTrace) {
|
|
541
|
-
return matchCauseIO_1(
|
|
565
|
+
return matchCauseIO_1(succeedNow_1, () => succeedNow_1(tsplus_module_5.empty(), __tsplusTrace), __tsplusTrace)(ma);
|
|
542
566
|
}
|
|
543
567
|
/**
|
|
544
|
-
* @tsplus
|
|
568
|
+
* @tsplus pipeable fncts.io.IO causeAsError
|
|
545
569
|
*/
|
|
546
570
|
|
|
547
571
|
|
|
548
|
-
function causeAsError(
|
|
549
|
-
return
|
|
572
|
+
function causeAsError(__tsplusTrace) {
|
|
573
|
+
return ma => {
|
|
574
|
+
return matchCauseIO_1(failNow_1, succeedNow_1, __tsplusTrace)(ma);
|
|
575
|
+
};
|
|
550
576
|
}
|
|
551
577
|
/**
|
|
552
578
|
* Returns an IO that models the execution of this effect, followed by
|
|
553
579
|
* the passing of its value to the specified continuation function `f`,
|
|
554
580
|
* followed by the effect that it returns.
|
|
555
581
|
*
|
|
556
|
-
* @tsplus
|
|
582
|
+
* @tsplus pipeable fncts.io.IO flatMap
|
|
557
583
|
*/
|
|
558
584
|
|
|
559
585
|
|
|
560
|
-
function flatMap_1(
|
|
561
|
-
return
|
|
586
|
+
function flatMap_1(f, __tsplusTrace) {
|
|
587
|
+
return ma => {
|
|
588
|
+
return new _definition2.Chain(ma, f, __tsplusTrace);
|
|
589
|
+
};
|
|
562
590
|
}
|
|
563
591
|
/**
|
|
564
|
-
* @tsplus
|
|
592
|
+
* @tsplus pipeable fncts.io.IO flatMapError
|
|
565
593
|
*/
|
|
566
594
|
|
|
567
595
|
|
|
568
|
-
function
|
|
569
|
-
return
|
|
596
|
+
function flatMapError(f, __tsplusTrace) {
|
|
597
|
+
return ma => {
|
|
598
|
+
return swapWith_1(effect => flatMap_1(f, __tsplusTrace)(effect), __tsplusTrace)(ma);
|
|
599
|
+
};
|
|
570
600
|
}
|
|
571
601
|
/**
|
|
572
602
|
* Checks the interrupt status, and produces the IO returned by the
|
|
@@ -577,31 +607,35 @@ function flatMapError_(ma, f, __tsplusTrace) {
|
|
|
577
607
|
|
|
578
608
|
|
|
579
609
|
function checkInterruptible(f, __tsplusTrace) {
|
|
580
|
-
return withFiberContext_1(fiber => f(
|
|
610
|
+
return withFiberContext_1(fiber => f(tsplus_module_9.fromBoolean(fiber.unsafeIsInterruptible)), __tsplusTrace);
|
|
581
611
|
}
|
|
582
612
|
/**
|
|
583
|
-
* @tsplus
|
|
613
|
+
* @tsplus pipeable fncts.io.IO collect
|
|
584
614
|
*/
|
|
585
615
|
|
|
586
616
|
|
|
587
|
-
function
|
|
588
|
-
return
|
|
617
|
+
function collect(f, pf, __tsplusTrace) {
|
|
618
|
+
return ma => {
|
|
619
|
+
return collectIO_1(f, a => tsplus_module_8.map(succeedNow_1)(pf(a)), __tsplusTrace)(ma);
|
|
620
|
+
};
|
|
589
621
|
}
|
|
590
622
|
/**
|
|
591
|
-
* @tsplus
|
|
623
|
+
* @tsplus pipeable fncts.io.IO collectIO
|
|
592
624
|
*/
|
|
593
625
|
|
|
594
626
|
|
|
595
|
-
function collectIO_1(
|
|
596
|
-
return
|
|
627
|
+
function collectIO_1(f, pf, __tsplusTrace) {
|
|
628
|
+
return ma => {
|
|
629
|
+
return flatMap_1(a => tsplus_module_8.getOrElse(() => fail_1(f, __tsplusTrace))(pf(a)), __tsplusTrace)(ma);
|
|
630
|
+
};
|
|
597
631
|
}
|
|
598
632
|
/**
|
|
599
633
|
* @tsplus static fncts.io.IOOps condIO
|
|
600
634
|
*/
|
|
601
635
|
|
|
602
636
|
|
|
603
|
-
function
|
|
604
|
-
return b ? onTrue : flatMap_1(
|
|
637
|
+
function condIO(b, onTrue, onFalse, __tsplusTrace) {
|
|
638
|
+
return b ? onTrue : flatMap_1(failNow_1, __tsplusTrace)(onFalse);
|
|
605
639
|
}
|
|
606
640
|
/**
|
|
607
641
|
* Returns a lazily constructed effect, whose construction may itself require
|
|
@@ -642,7 +676,7 @@ function deferTry(io, __tsplusTrace) {
|
|
|
642
676
|
try {
|
|
643
677
|
return io();
|
|
644
678
|
} catch (u) {
|
|
645
|
-
throw new _definition2.IOError(
|
|
679
|
+
throw new _definition2.IOError(tsplus_module_10.fail(u));
|
|
646
680
|
}
|
|
647
681
|
}, __tsplusTrace);
|
|
648
682
|
}
|
|
@@ -659,7 +693,7 @@ function deferTryWith(io, __tsplusTrace) {
|
|
|
659
693
|
try {
|
|
660
694
|
return io(runtimeConfig, id);
|
|
661
695
|
} catch (u) {
|
|
662
|
-
throw new _definition2.IOError(
|
|
696
|
+
throw new _definition2.IOError(tsplus_module_10.fail(u));
|
|
663
697
|
}
|
|
664
698
|
}, __tsplusTrace);
|
|
665
699
|
}
|
|
@@ -678,7 +712,7 @@ function deferTryCatch(io, onThrow, __tsplusTrace) {
|
|
|
678
712
|
try {
|
|
679
713
|
return io();
|
|
680
714
|
} catch (u) {
|
|
681
|
-
throw new _definition2.IOError(
|
|
715
|
+
throw new _definition2.IOError(tsplus_module_10.fail(onThrow(u)));
|
|
682
716
|
}
|
|
683
717
|
}, __tsplusTrace);
|
|
684
718
|
}
|
|
@@ -697,7 +731,7 @@ function deferTryCatchWith(io, onThrow, __tsplusTrace) {
|
|
|
697
731
|
try {
|
|
698
732
|
return io(runtimeConfig, id);
|
|
699
733
|
} catch (u) {
|
|
700
|
-
throw new _definition2.IOError(
|
|
734
|
+
throw new _definition2.IOError(tsplus_module_10.fail(onThrow(u)));
|
|
701
735
|
}
|
|
702
736
|
}, __tsplusTrace);
|
|
703
737
|
}
|
|
@@ -706,7 +740,7 @@ function deferTryCatchWith(io, onThrow, __tsplusTrace) {
|
|
|
706
740
|
*/
|
|
707
741
|
|
|
708
742
|
|
|
709
|
-
const descriptor = /*#__PURE__*/descriptorWith_1(succeedNow_1, fileName_1 + ":
|
|
743
|
+
const descriptor = /*#__PURE__*/descriptorWith_1(succeedNow_1, fileName_1 + ":528:41");
|
|
710
744
|
/**
|
|
711
745
|
* Constructs an IO based on information about the current fiber, such as
|
|
712
746
|
* its identity.
|
|
@@ -727,26 +761,30 @@ function descriptorWith_1(f, __tsplusTrace) {
|
|
|
727
761
|
|
|
728
762
|
|
|
729
763
|
function either_1(ma, __tsplusTrace) {
|
|
730
|
-
return match_1(
|
|
764
|
+
return match_1(tsplus_module_3.left, tsplus_module_3.right, __tsplusTrace)(ma);
|
|
731
765
|
}
|
|
732
766
|
/**
|
|
733
|
-
* @tsplus
|
|
767
|
+
* @tsplus pipeable fncts.io.IO ensuring
|
|
734
768
|
*/
|
|
735
769
|
|
|
736
770
|
|
|
737
|
-
function
|
|
738
|
-
return
|
|
739
|
-
fiber
|
|
740
|
-
|
|
741
|
-
|
|
771
|
+
function ensuring(finalizer, __tsplusTrace) {
|
|
772
|
+
return self => {
|
|
773
|
+
return withFiberContext_1(fiber => {
|
|
774
|
+
fiber.unsafeAddFinalizer(finalizer);
|
|
775
|
+
return self;
|
|
776
|
+
}, __tsplusTrace);
|
|
777
|
+
};
|
|
742
778
|
}
|
|
743
779
|
/**
|
|
744
|
-
* @tsplus
|
|
780
|
+
* @tsplus pipeable fncts.io.IO errorAsCause
|
|
745
781
|
*/
|
|
746
782
|
|
|
747
783
|
|
|
748
|
-
function errorAsCause(
|
|
749
|
-
return
|
|
784
|
+
function errorAsCause(__tsplusTrace) {
|
|
785
|
+
return ma => {
|
|
786
|
+
return matchIO_1(failCauseNow_1, succeedNow_1, __tsplusTrace)(ma);
|
|
787
|
+
};
|
|
750
788
|
}
|
|
751
789
|
/**
|
|
752
790
|
* @tsplus getter fncts.io.IO eventually
|
|
@@ -754,15 +792,17 @@ function errorAsCause(ma, __tsplusTrace) {
|
|
|
754
792
|
|
|
755
793
|
|
|
756
794
|
function eventually_1(ma, __tsplusTrace) {
|
|
757
|
-
return orElse_1(
|
|
795
|
+
return orElse_1(() => eventually_1(ma, __tsplusTrace), __tsplusTrace)(ma);
|
|
758
796
|
}
|
|
759
797
|
/**
|
|
760
|
-
* @tsplus
|
|
798
|
+
* @tsplus pipeable fncts.io.IO extend
|
|
761
799
|
*/
|
|
762
800
|
|
|
763
801
|
|
|
764
|
-
function
|
|
765
|
-
return
|
|
802
|
+
function extend(f, __tsplusTrace) {
|
|
803
|
+
return wa => {
|
|
804
|
+
return matchIO_1(failNow_1, _ => succeed_1(() => f(wa), __tsplusTrace), __tsplusTrace)(wa);
|
|
805
|
+
};
|
|
766
806
|
}
|
|
767
807
|
/**
|
|
768
808
|
* @tsplus static fncts.io.IOOps fail
|
|
@@ -807,7 +847,7 @@ function failCause_1(cause, __tsplusTrace) {
|
|
|
807
847
|
*/
|
|
808
848
|
|
|
809
849
|
|
|
810
|
-
const fiberId = /*#__PURE__*/descriptorWith_1(d => succeedNow_1(d.id, fileName_1 + ":
|
|
850
|
+
const fiberId = /*#__PURE__*/descriptorWith_1(d => succeedNow_1(d.id, fileName_1 + ":623:89"), fileName_1 + ":623:68");
|
|
811
851
|
/**
|
|
812
852
|
* Filters the collection using the specified effectual predicate.
|
|
813
853
|
*
|
|
@@ -817,20 +857,20 @@ const fiberId = /*#__PURE__*/descriptorWith_1(d => succeedNow_1(d.id, fileName_1
|
|
|
817
857
|
exports.fiberId = fiberId;
|
|
818
858
|
|
|
819
859
|
function filter_1(as, f, __tsplusTrace) {
|
|
820
|
-
return map_1(
|
|
860
|
+
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) => {
|
|
821
861
|
if (p) {
|
|
822
862
|
builder.append(a);
|
|
823
863
|
}
|
|
824
864
|
|
|
825
865
|
return builder;
|
|
826
|
-
}, __tsplusTrace))
|
|
866
|
+
}, __tsplusTrace)(eff))(as));
|
|
827
867
|
}
|
|
828
868
|
/**
|
|
829
869
|
* @tsplus static fncts.io.IOOps filterMap
|
|
830
870
|
*/
|
|
831
871
|
|
|
832
872
|
|
|
833
|
-
function
|
|
873
|
+
function filterMap(as, f, __tsplusTrace) {
|
|
834
874
|
return filterMapWithIndex_1(as, (_, a) => f(a), __tsplusTrace);
|
|
835
875
|
}
|
|
836
876
|
/**
|
|
@@ -841,11 +881,11 @@ function filterMap_(as, f, __tsplusTrace) {
|
|
|
841
881
|
function filterMapWithIndex_1(as, f, __tsplusTrace) {
|
|
842
882
|
return defer_1(() => {
|
|
843
883
|
const bs = [];
|
|
844
|
-
return as_1(foreachWithIndexDiscard_1(as, (i, a) => map_1(
|
|
845
|
-
if (
|
|
884
|
+
return as_1(() => tsplus_module_13.from(bs), __tsplusTrace)(foreachWithIndexDiscard_1(as, (i, a) => map_1(b => {
|
|
885
|
+
if (tsplus_module_14.isJust(b)) {
|
|
846
886
|
bs.push(b.value);
|
|
847
887
|
}
|
|
848
|
-
}, __tsplusTrace),
|
|
888
|
+
}, __tsplusTrace)(f(i, a)), __tsplusTrace));
|
|
849
889
|
}, __tsplusTrace);
|
|
850
890
|
}
|
|
851
891
|
/**
|
|
@@ -856,16 +896,20 @@ function filterMapWithIndex_1(as, f, __tsplusTrace) {
|
|
|
856
896
|
*/
|
|
857
897
|
|
|
858
898
|
|
|
859
|
-
function
|
|
860
|
-
return filter_1(as, a => map_1(
|
|
899
|
+
function filterNot(as, f, __tsplusTrace) {
|
|
900
|
+
return filter_1(as, a => map_1(b => !b, __tsplusTrace)(f(a)), __tsplusTrace);
|
|
861
901
|
}
|
|
862
902
|
|
|
863
|
-
function filterOrElse_1(
|
|
864
|
-
return
|
|
903
|
+
function filterOrElse_1(predicate, or, __tsplusTrace) {
|
|
904
|
+
return fa => {
|
|
905
|
+
return flatMap_1(a => predicate(a) ? succeedNow_1(a, __tsplusTrace) : defer_1(() => or(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
906
|
+
};
|
|
865
907
|
}
|
|
866
908
|
|
|
867
|
-
function
|
|
868
|
-
return
|
|
909
|
+
function filterOrFail(predicate, failWith, __tsplusTrace) {
|
|
910
|
+
return fa => {
|
|
911
|
+
return filterOrElse_1(predicate, a => failNow_1(failWith(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
912
|
+
};
|
|
869
913
|
}
|
|
870
914
|
/**
|
|
871
915
|
* Returns an `IO` that yields the value of the first
|
|
@@ -876,11 +920,13 @@ function filterOrFail_(fa, predicate, failWith, __tsplusTrace) {
|
|
|
876
920
|
|
|
877
921
|
|
|
878
922
|
function firstSuccess(mas, __tsplusTrace) {
|
|
879
|
-
return mas.reduce((b, a) => orElse_1(
|
|
923
|
+
return mas.reduce((b, a) => orElse_1(() => a, __tsplusTrace)(b));
|
|
880
924
|
}
|
|
881
925
|
|
|
882
|
-
function
|
|
883
|
-
return
|
|
926
|
+
function filterOrHalt(predicate, haltWith, __tsplusTrace) {
|
|
927
|
+
return fa => {
|
|
928
|
+
return filterOrElse_1(predicate, a => haltNow_1(haltWith(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
929
|
+
};
|
|
884
930
|
}
|
|
885
931
|
/**
|
|
886
932
|
* @tsplus getter fncts.io.IO flatten
|
|
@@ -888,7 +934,7 @@ function filterOrHalt_(fa, predicate, haltWith, __tsplusTrace) {
|
|
|
888
934
|
|
|
889
935
|
|
|
890
936
|
function flatten(self, __tsplusTrace) {
|
|
891
|
-
return flatMap_1(
|
|
937
|
+
return flatMap_1(_function.identity, __tsplusTrace)(self);
|
|
892
938
|
}
|
|
893
939
|
/**
|
|
894
940
|
* Folds an `Iterable<A>` using an effectful function f, working sequentially from left to right.
|
|
@@ -898,7 +944,7 @@ function flatten(self, __tsplusTrace) {
|
|
|
898
944
|
|
|
899
945
|
|
|
900
946
|
function foldLeft_1(as, b, f, __tsplusTrace) {
|
|
901
|
-
return
|
|
947
|
+
return tsplus_module_12.foldLeft(succeedNow_1(b, __tsplusTrace), (acc, el) => flatMap_1(a => f(a, el), __tsplusTrace)(acc))(as);
|
|
902
948
|
}
|
|
903
949
|
/**
|
|
904
950
|
* Combines an array of `IO`s using a `Monoid`
|
|
@@ -907,10 +953,10 @@ function foldLeft_1(as, b, f, __tsplusTrace) {
|
|
|
907
953
|
*/
|
|
908
954
|
|
|
909
955
|
|
|
910
|
-
function
|
|
956
|
+
function foldMap(as, f,
|
|
911
957
|
/** @tsplus auto */
|
|
912
958
|
M) {
|
|
913
|
-
return foldLeft_1(as, M.nat, (m, a) => map_1(a
|
|
959
|
+
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");
|
|
914
960
|
}
|
|
915
961
|
|
|
916
962
|
function foldRightLoop(iterator, b, f, __tsplusTrace) {
|
|
@@ -924,13 +970,13 @@ function foldRightLoop(iterator, b, f, __tsplusTrace) {
|
|
|
924
970
|
*/
|
|
925
971
|
|
|
926
972
|
|
|
927
|
-
function
|
|
973
|
+
function foldRight(as, b, f, __tsplusTrace) {
|
|
928
974
|
return foldRightLoop(as[Symbol.iterator](), b, f, __tsplusTrace);
|
|
929
975
|
}
|
|
930
976
|
|
|
931
977
|
function foreachWithIndexDiscardLoop(iterator, f, i = 0, __tsplusTrace) {
|
|
932
978
|
const next = iterator.next();
|
|
933
|
-
return next.done ? unit_1 : flatMap_1(
|
|
979
|
+
return next.done ? unit_1 : flatMap_1(() => foreachWithIndexDiscardLoop(iterator, f, i + 1, __tsplusTrace), __tsplusTrace)(f(i, next.value));
|
|
934
980
|
}
|
|
935
981
|
/**
|
|
936
982
|
* Applies the function `f` to each element of the `Iterable<A>` and
|
|
@@ -946,10 +992,10 @@ function foreachWithIndexDiscardLoop(iterator, f, i = 0, __tsplusTrace) {
|
|
|
946
992
|
function foreach_1(as, f, __tsplusTrace) {
|
|
947
993
|
return defer_1(() => {
|
|
948
994
|
const acc = [];
|
|
949
|
-
return as_1(foreachWithIndexDiscard_1(as, (_, a) => flatMap_1(
|
|
995
|
+
return as_1(() => tsplus_module_13.from(acc), __tsplusTrace)(foreachWithIndexDiscard_1(as, (_, a) => flatMap_1(b => {
|
|
950
996
|
acc.push(b);
|
|
951
997
|
return unit_1;
|
|
952
|
-
}, __tsplusTrace)
|
|
998
|
+
}, __tsplusTrace)(f(a)), __tsplusTrace));
|
|
953
999
|
}, __tsplusTrace);
|
|
954
1000
|
}
|
|
955
1001
|
/**
|
|
@@ -963,13 +1009,13 @@ function foreach_1(as, f, __tsplusTrace) {
|
|
|
963
1009
|
*/
|
|
964
1010
|
|
|
965
1011
|
|
|
966
|
-
function
|
|
1012
|
+
function foreachWithIndex(as, f, __tsplusTrace) {
|
|
967
1013
|
return defer_1(() => {
|
|
968
1014
|
const acc = [];
|
|
969
|
-
return as_1(foreachWithIndexDiscard_1(as, (i, a) => flatMap_1(
|
|
1015
|
+
return as_1(() => tsplus_module_13.from(acc), __tsplusTrace)(foreachWithIndexDiscard_1(as, (i, a) => flatMap_1(b => {
|
|
970
1016
|
acc.push(b);
|
|
971
1017
|
return unit_1;
|
|
972
|
-
}, __tsplusTrace),
|
|
1018
|
+
}, __tsplusTrace)(f(i, a)), __tsplusTrace));
|
|
973
1019
|
}, __tsplusTrace);
|
|
974
1020
|
}
|
|
975
1021
|
/**
|
|
@@ -999,7 +1045,7 @@ function foreachDiscard_1(as, f, __tsplusTrace) {
|
|
|
999
1045
|
|
|
1000
1046
|
|
|
1001
1047
|
function forever_1(ma, __tsplusTrace) {
|
|
1002
|
-
return flatMap_1(
|
|
1048
|
+
return flatMap_1(() => forever_1(ma, __tsplusTrace), __tsplusTrace)(apSecond_1(yieldNow_1, __tsplusTrace)(ma));
|
|
1003
1049
|
}
|
|
1004
1050
|
/**
|
|
1005
1051
|
* Returns an IO that forks this IO into its own separate fiber,
|
|
@@ -1010,7 +1056,7 @@ function forever_1(ma, __tsplusTrace) {
|
|
|
1010
1056
|
* new fiber, concurrently and without "blocking" the fiber executing other
|
|
1011
1057
|
* IOs. Using fibers can be tricky, so instead of using this method
|
|
1012
1058
|
* directly, consider other higher-level methods, such as `raceWith`,
|
|
1013
|
-
* `
|
|
1059
|
+
* `zipC`, and so forth.
|
|
1014
1060
|
*
|
|
1015
1061
|
* The fiber returned by this method has methods interrupt the fiber and to
|
|
1016
1062
|
* wait for it to finish executing the IO. See `Fiber` for more
|
|
@@ -1038,27 +1084,29 @@ function fork(ma, __tsplusTrace) {
|
|
|
1038
1084
|
|
|
1039
1085
|
|
|
1040
1086
|
function fromEither(either, __tsplusTrace) {
|
|
1041
|
-
return flatMap_1(
|
|
1087
|
+
return flatMap_1(ea => tsplus_module_6.match(failNow_1, succeedNow_1)(ea), __tsplusTrace)(succeed_1(either, __tsplusTrace));
|
|
1042
1088
|
}
|
|
1043
1089
|
/**
|
|
1044
1090
|
* Lifts an `Either` into an `IO`
|
|
1045
1091
|
*
|
|
1046
1092
|
* @tsplus static fncts.io.IOOps fromEitherNow
|
|
1093
|
+
* @tsplus getter fncts.Either toIO
|
|
1047
1094
|
*/
|
|
1048
1095
|
|
|
1049
1096
|
|
|
1050
1097
|
function fromEitherNow(either, __tsplusTrace) {
|
|
1051
|
-
return tsplus_module_6.
|
|
1098
|
+
return tsplus_module_6.match(failNow_1, succeedNow_1)(either);
|
|
1052
1099
|
}
|
|
1053
1100
|
/**
|
|
1054
1101
|
* Lifts an `Eval` into an `IO`
|
|
1055
1102
|
*
|
|
1056
1103
|
* @tsplus static fncts.io.IOOps fromEval
|
|
1104
|
+
* @tsplus getter fncts.Eval toIO
|
|
1057
1105
|
*/
|
|
1058
1106
|
|
|
1059
1107
|
|
|
1060
1108
|
function fromEval(computation, __tsplusTrace) {
|
|
1061
|
-
return succeed_1(() =>
|
|
1109
|
+
return succeed_1(() => tsplus_module_15.run(computation), __tsplusTrace);
|
|
1062
1110
|
}
|
|
1063
1111
|
/**
|
|
1064
1112
|
* Creates a `IO` from an exit value
|
|
@@ -1068,17 +1116,18 @@ function fromEval(computation, __tsplusTrace) {
|
|
|
1068
1116
|
|
|
1069
1117
|
|
|
1070
1118
|
function fromExit(exit, __tsplusTrace) {
|
|
1071
|
-
return defer_1(() =>
|
|
1119
|
+
return defer_1(() => tsplus_module_16.match(failCauseNow_1, succeedNow_1)(exit()), __tsplusTrace);
|
|
1072
1120
|
}
|
|
1073
1121
|
/**
|
|
1074
1122
|
* Creates a `IO` from an exit value
|
|
1075
1123
|
*
|
|
1076
1124
|
* @tsplus static fncts.io.IOOps fromExitNow
|
|
1125
|
+
* @tsplus getter fncts.Exit toIO
|
|
1077
1126
|
*/
|
|
1078
1127
|
|
|
1079
1128
|
|
|
1080
1129
|
function fromExitNow(exit, __tsplusTrace) {
|
|
1081
|
-
return
|
|
1130
|
+
return tsplus_module_16.match(failCauseNow_1, succeedNow_1)(exit);
|
|
1082
1131
|
}
|
|
1083
1132
|
/**
|
|
1084
1133
|
* Lifts a `Maybe` into an `IO` but preserves the error as a `Maybe` in the error channel, making it easier to compose
|
|
@@ -1089,15 +1138,16 @@ function fromExitNow(exit, __tsplusTrace) {
|
|
|
1089
1138
|
|
|
1090
1139
|
|
|
1091
1140
|
function fromMaybe(maybe, __tsplusTrace) {
|
|
1092
|
-
return flatMap_1(
|
|
1141
|
+
return flatMap_1(m => tsplus_module_4.match(() => failNow_1(tsplus_module_2.nothing(), __tsplusTrace), succeedNow_1)(m), __tsplusTrace)(succeed_1(maybe, __tsplusTrace));
|
|
1093
1142
|
}
|
|
1094
1143
|
/**
|
|
1095
1144
|
* @tsplus static fncts.io.IOOps fromMaybeNow
|
|
1145
|
+
* @tsplus getter fncts.Maybe toIO
|
|
1096
1146
|
*/
|
|
1097
1147
|
|
|
1098
1148
|
|
|
1099
1149
|
function fromMaybeNow(maybe, __tsplusTrace) {
|
|
1100
|
-
return tsplus_module_4.
|
|
1150
|
+
return tsplus_module_4.match(() => failNow_1(tsplus_module_2.nothing(), __tsplusTrace), succeedNow_1)(maybe);
|
|
1101
1151
|
}
|
|
1102
1152
|
/**
|
|
1103
1153
|
* Create an IO that when executed will construct `promise` and wait for its result,
|
|
@@ -1143,27 +1193,31 @@ function fromPromiseHalt(promise, __tsplusTrace) {
|
|
|
1143
1193
|
|
|
1144
1194
|
|
|
1145
1195
|
function get(ma, __tsplusTrace) {
|
|
1146
|
-
return matchCauseIO_1(
|
|
1196
|
+
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);
|
|
1147
1197
|
}
|
|
1148
1198
|
/**
|
|
1149
1199
|
* Extracts the optional value, or returns the given 'orElse'.
|
|
1150
1200
|
*
|
|
1151
|
-
* @tsplus
|
|
1201
|
+
* @tsplus pipeable fncts.io.IO getOrElse
|
|
1152
1202
|
*/
|
|
1153
1203
|
|
|
1154
1204
|
|
|
1155
|
-
function
|
|
1156
|
-
return
|
|
1205
|
+
function getOrElse(orElse, __tsplusTrace) {
|
|
1206
|
+
return ma => {
|
|
1207
|
+
return map_1(ma => tsplus_module_8.getOrElse(orElse)(ma), __tsplusTrace)(ma);
|
|
1208
|
+
};
|
|
1157
1209
|
}
|
|
1158
1210
|
/**
|
|
1159
1211
|
* Extracts the optional value, or executes the effect 'orElse'.
|
|
1160
1212
|
*
|
|
1161
|
-
* @tsplus
|
|
1213
|
+
* @tsplus pipeable fncts.io.IO getOrElseIO
|
|
1162
1214
|
*/
|
|
1163
1215
|
|
|
1164
1216
|
|
|
1165
|
-
function
|
|
1166
|
-
return
|
|
1217
|
+
function getOrElseIO(orElse, __tsplusTrace) {
|
|
1218
|
+
return ma => {
|
|
1219
|
+
return flatMap_1(mab => tsplus_module_8.getOrElse(orElse)(tsplus_module_8.map(succeedNow_1)(mab)), __tsplusTrace)(ma);
|
|
1220
|
+
};
|
|
1167
1221
|
}
|
|
1168
1222
|
/**
|
|
1169
1223
|
* Lifts a Maybe into an IO. If the option is `Nothing`, fail with `onNothing`.
|
|
@@ -1173,7 +1227,7 @@ function getOrElseIO_(ma, orElse, __tsplusTrace) {
|
|
|
1173
1227
|
|
|
1174
1228
|
|
|
1175
1229
|
function getOrFailWith_1(maybe, onNothing, __tsplusTrace) {
|
|
1176
|
-
return defer_1(() => tsplus_module_4.
|
|
1230
|
+
return defer_1(() => tsplus_module_4.match(() => fail_1(onNothing, __tsplusTrace), succeedNow_1)(maybe), __tsplusTrace);
|
|
1177
1231
|
}
|
|
1178
1232
|
/**
|
|
1179
1233
|
* Lifts a Maybe into a IO, if the Maybe is `Nothing` it fails with Unit.
|
|
@@ -1195,7 +1249,7 @@ function getOrFailUnit(option, __tsplusTrace) {
|
|
|
1195
1249
|
|
|
1196
1250
|
|
|
1197
1251
|
function halt(e, __tsplusTrace) {
|
|
1198
|
-
return failCause_1(() => tsplus_module_5.halt(e(),
|
|
1252
|
+
return failCause_1(() => tsplus_module_5.halt(e(), tsplus_module_17.none), __tsplusTrace);
|
|
1199
1253
|
}
|
|
1200
1254
|
/**
|
|
1201
1255
|
* Creates an `IO` that halts with the specified defect
|
|
@@ -1207,23 +1261,25 @@ function halt(e, __tsplusTrace) {
|
|
|
1207
1261
|
|
|
1208
1262
|
|
|
1209
1263
|
function haltNow_1(e, __tsplusTrace) {
|
|
1210
|
-
return failCauseNow_1(tsplus_module_5.halt(e,
|
|
1264
|
+
return failCauseNow_1(tsplus_module_5.halt(e, tsplus_module_17.none), __tsplusTrace);
|
|
1211
1265
|
}
|
|
1212
1266
|
/**
|
|
1213
|
-
* @tsplus
|
|
1267
|
+
* @tsplus pipeable fncts.io.IO ifIO
|
|
1214
1268
|
*/
|
|
1215
1269
|
|
|
1216
1270
|
|
|
1217
|
-
function ifIO_1(
|
|
1218
|
-
return
|
|
1271
|
+
function ifIO_1(onFalse, onTrue, __tsplusTrace) {
|
|
1272
|
+
return self => {
|
|
1273
|
+
return flatMap_1(b => b ? onTrue() : onFalse(), __tsplusTrace)(self);
|
|
1274
|
+
};
|
|
1219
1275
|
}
|
|
1220
1276
|
/**
|
|
1221
1277
|
* @tsplus static fncts.io.IOOps if
|
|
1222
1278
|
*/
|
|
1223
1279
|
|
|
1224
1280
|
|
|
1225
|
-
function
|
|
1226
|
-
return ifIO_1(
|
|
1281
|
+
function cond(b, onTrue, onFalse, __tsplusTrace) {
|
|
1282
|
+
return ifIO_1(onTrue, onFalse, __tsplusTrace)(succeedNow_1(b, __tsplusTrace));
|
|
1227
1283
|
}
|
|
1228
1284
|
/**
|
|
1229
1285
|
* @tsplus getter fncts.io.IO ignore
|
|
@@ -1231,7 +1287,7 @@ function if_(b, onTrue, onFalse, __tsplusTrace) {
|
|
|
1231
1287
|
|
|
1232
1288
|
|
|
1233
1289
|
function ignore(fa, __tsplusTrace) {
|
|
1234
|
-
return match_1(
|
|
1290
|
+
return match_1(() => undefined, () => undefined, __tsplusTrace)(fa);
|
|
1235
1291
|
}
|
|
1236
1292
|
/**
|
|
1237
1293
|
* Folds a `IO` to a boolean describing whether or not it is a failure
|
|
@@ -1241,7 +1297,7 @@ function ignore(fa, __tsplusTrace) {
|
|
|
1241
1297
|
|
|
1242
1298
|
|
|
1243
1299
|
function isFailure(ma, __tsplusTrace) {
|
|
1244
|
-
return match_1(
|
|
1300
|
+
return match_1(() => true, () => false, __tsplusTrace)(ma);
|
|
1245
1301
|
}
|
|
1246
1302
|
/**
|
|
1247
1303
|
* Folds a `IO` to a boolean describing whether or not it is a success
|
|
@@ -1251,7 +1307,7 @@ function isFailure(ma, __tsplusTrace) {
|
|
|
1251
1307
|
|
|
1252
1308
|
|
|
1253
1309
|
function isSuccess(ma, __tsplusTrace) {
|
|
1254
|
-
return match_1(
|
|
1310
|
+
return match_1(() => false, () => true, __tsplusTrace)(ma);
|
|
1255
1311
|
}
|
|
1256
1312
|
/**
|
|
1257
1313
|
* Iterates with the specified effectual function. The moral equivalent of:
|
|
@@ -1271,7 +1327,7 @@ function isSuccess(ma, __tsplusTrace) {
|
|
|
1271
1327
|
|
|
1272
1328
|
|
|
1273
1329
|
function iterate_1(initial, cont, body, __tsplusTrace) {
|
|
1274
|
-
return cont(initial) ? flatMap_1(
|
|
1330
|
+
return cont(initial) ? flatMap_1(a => iterate_1(a, cont, body, __tsplusTrace), __tsplusTrace)(body(initial)) : succeedNow_1(initial, __tsplusTrace);
|
|
1275
1331
|
}
|
|
1276
1332
|
/**
|
|
1277
1333
|
* Returns an IO with the value on the left part.
|
|
@@ -1281,7 +1337,7 @@ function iterate_1(initial, cont, body, __tsplusTrace) {
|
|
|
1281
1337
|
|
|
1282
1338
|
|
|
1283
1339
|
function left(a, __tsplusTrace) {
|
|
1284
|
-
return flatMap_1(
|
|
1340
|
+
return flatMap_1(a => succeedNow_1(tsplus_module_3.left(a), __tsplusTrace), __tsplusTrace)(succeed_1(a, __tsplusTrace));
|
|
1285
1341
|
}
|
|
1286
1342
|
/**
|
|
1287
1343
|
* @tsplus static fncts.io.IOOps log
|
|
@@ -1313,9 +1369,9 @@ function log(message, __tsplusTrace) {
|
|
|
1313
1369
|
|
|
1314
1370
|
function loop_1(initial, cont, inc, body, __tsplusTrace) {
|
|
1315
1371
|
if (cont(initial)) {
|
|
1316
|
-
return flatMap_1(
|
|
1372
|
+
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));
|
|
1317
1373
|
} else {
|
|
1318
|
-
return succeedNow_1(
|
|
1374
|
+
return succeedNow_1(tsplus_module_18.empty(), __tsplusTrace);
|
|
1319
1375
|
}
|
|
1320
1376
|
}
|
|
1321
1377
|
/**
|
|
@@ -1335,9 +1391,9 @@ function loop_1(initial, cont, inc, body, __tsplusTrace) {
|
|
|
1335
1391
|
*/
|
|
1336
1392
|
|
|
1337
1393
|
|
|
1338
|
-
function
|
|
1394
|
+
function loopUnit(initial, cont, inc, body, __tsplusTrace) {
|
|
1339
1395
|
if (cont(initial)) {
|
|
1340
|
-
return asUnit_1(flatMap_1(
|
|
1396
|
+
return asUnit_1(flatMap_1(() => loop_1(inc(initial), cont, inc, body, __tsplusTrace), __tsplusTrace)(body(initial)), __tsplusTrace);
|
|
1341
1397
|
} else {
|
|
1342
1398
|
return unit_1;
|
|
1343
1399
|
}
|
|
@@ -1345,12 +1401,14 @@ function loopUnit_(initial, cont, inc, body, __tsplusTrace) {
|
|
|
1345
1401
|
/**
|
|
1346
1402
|
* Returns an `IO` whose success is mapped by the specified function `f`.
|
|
1347
1403
|
*
|
|
1348
|
-
* @tsplus
|
|
1404
|
+
* @tsplus pipeable fncts.io.IO map
|
|
1349
1405
|
*/
|
|
1350
1406
|
|
|
1351
1407
|
|
|
1352
|
-
function map_1(
|
|
1353
|
-
return
|
|
1408
|
+
function map_1(f, __tsplusTrace) {
|
|
1409
|
+
return fa => {
|
|
1410
|
+
return flatMap_1(a => succeedNow_1(f(a), __tsplusTrace), __tsplusTrace)(fa);
|
|
1411
|
+
};
|
|
1354
1412
|
}
|
|
1355
1413
|
/**
|
|
1356
1414
|
* Map covariantly over the first argument.
|
|
@@ -1359,82 +1417,96 @@ function map_1(fa, f, __tsplusTrace) {
|
|
|
1359
1417
|
* function. This can be used to lift a "smaller" error into a "larger"
|
|
1360
1418
|
* error.
|
|
1361
1419
|
*
|
|
1362
|
-
* @tsplus
|
|
1420
|
+
* @tsplus pipeable fncts.io.IO mapError
|
|
1363
1421
|
*/
|
|
1364
1422
|
|
|
1365
1423
|
|
|
1366
|
-
function mapError_1(
|
|
1367
|
-
return
|
|
1424
|
+
function mapError_1(f, __tsplusTrace) {
|
|
1425
|
+
return fea => {
|
|
1426
|
+
return matchCauseIO_1(cause => failCauseNow_1(tsplus_module_5.map(f)(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(fea);
|
|
1427
|
+
};
|
|
1368
1428
|
}
|
|
1369
1429
|
/**
|
|
1370
1430
|
* @tsplus static fncts.io.IOOps mapTryCatch
|
|
1371
1431
|
*/
|
|
1372
1432
|
|
|
1373
1433
|
|
|
1374
|
-
function
|
|
1375
|
-
return flatMap_1(
|
|
1434
|
+
function mapTryCatch(io, f, onThrow, __tsplusTrace) {
|
|
1435
|
+
return flatMap_1(a => tryCatch_1(() => f(a), onThrow, __tsplusTrace), __tsplusTrace)(io);
|
|
1376
1436
|
}
|
|
1377
1437
|
/**
|
|
1378
1438
|
* Returns an IO with its full cause of failure mapped using
|
|
1379
1439
|
* the specified function. This can be used to transform errors
|
|
1380
1440
|
* while preserving the original structure of Cause.
|
|
1381
1441
|
*
|
|
1382
|
-
* @tsplus
|
|
1442
|
+
* @tsplus pipeable fncts.io.IO mapErrorCause
|
|
1383
1443
|
*/
|
|
1384
1444
|
|
|
1385
1445
|
|
|
1386
|
-
function mapErrorCause_1(
|
|
1387
|
-
return
|
|
1446
|
+
function mapErrorCause_1(f, __tsplusTrace) {
|
|
1447
|
+
return ma => {
|
|
1448
|
+
return matchCauseIO_1(cause => failCauseNow_1(f(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(ma);
|
|
1449
|
+
};
|
|
1388
1450
|
}
|
|
1389
1451
|
/**
|
|
1390
1452
|
* A more powerful version of `match_` that allows recovering from any kind of failure except interruptions.
|
|
1391
1453
|
*
|
|
1392
|
-
* @tsplus
|
|
1454
|
+
* @tsplus pipeable fncts.io.IO matchCause
|
|
1393
1455
|
*/
|
|
1394
1456
|
|
|
1395
1457
|
|
|
1396
|
-
function
|
|
1397
|
-
return
|
|
1458
|
+
function matchCause(onFailure, onSuccess, __tsplusTrace) {
|
|
1459
|
+
return self => {
|
|
1460
|
+
return matchCauseIO_1(cause => succeedNow_1(onFailure(cause), __tsplusTrace), a => succeedNow_1(onSuccess(a), __tsplusTrace), __tsplusTrace)(self);
|
|
1461
|
+
};
|
|
1398
1462
|
}
|
|
1399
1463
|
/**
|
|
1400
1464
|
* A more powerful version of `matchIO` that allows recovering from any kind of failure except interruptions.
|
|
1401
1465
|
*
|
|
1402
|
-
* @tsplus
|
|
1466
|
+
* @tsplus pipeable fncts.io.IO matchCauseIO
|
|
1403
1467
|
*/
|
|
1404
1468
|
|
|
1405
1469
|
|
|
1406
|
-
function matchCauseIO_1(
|
|
1407
|
-
return
|
|
1470
|
+
function matchCauseIO_1(onFailure, onSuccess, __tsplusTrace) {
|
|
1471
|
+
return self => {
|
|
1472
|
+
return new _definition2.Match(self, onFailure, onSuccess, __tsplusTrace);
|
|
1473
|
+
};
|
|
1408
1474
|
}
|
|
1409
1475
|
/**
|
|
1410
|
-
* @tsplus
|
|
1476
|
+
* @tsplus pipeable fncts.io.IO matchIO
|
|
1411
1477
|
*/
|
|
1412
1478
|
|
|
1413
1479
|
|
|
1414
|
-
function matchIO_1(
|
|
1415
|
-
return
|
|
1480
|
+
function matchIO_1(onFailure, onSuccess, __tsplusTrace) {
|
|
1481
|
+
return self => {
|
|
1482
|
+
return matchCauseIO_1(cause => tsplus_module_6.match(onFailure, failCauseNow_1)(tsplus_module_5.failureOrCause(cause)), onSuccess, __tsplusTrace)(self);
|
|
1483
|
+
};
|
|
1416
1484
|
}
|
|
1417
1485
|
/**
|
|
1418
1486
|
* Folds over the failure value or the success value to yield an IO that
|
|
1419
1487
|
* does not fail, but succeeds with the value returned by the left or right
|
|
1420
1488
|
* function passed to `match_`.
|
|
1421
1489
|
*
|
|
1422
|
-
* @tsplus
|
|
1490
|
+
* @tsplus pipeable fncts.io.IO match
|
|
1423
1491
|
*/
|
|
1424
1492
|
|
|
1425
1493
|
|
|
1426
|
-
function match_1(
|
|
1427
|
-
return
|
|
1494
|
+
function match_1(onFailure, onSuccess, __tsplusTrace) {
|
|
1495
|
+
return self => {
|
|
1496
|
+
return matchIO_1(e => succeedNow_1(onFailure(e), __tsplusTrace), a => succeedNow_1(onSuccess(a), __tsplusTrace), __tsplusTrace)(self);
|
|
1497
|
+
};
|
|
1428
1498
|
}
|
|
1429
1499
|
/**
|
|
1430
1500
|
* A version of `matchIO` that gives you the (optional) trace of the error.
|
|
1431
1501
|
*
|
|
1432
|
-
* @tsplus
|
|
1502
|
+
* @tsplus pipeable fncts.io.IO matchTraceIO
|
|
1433
1503
|
*/
|
|
1434
1504
|
|
|
1435
1505
|
|
|
1436
|
-
function
|
|
1437
|
-
return
|
|
1506
|
+
function matchTraceIO(onFailure, onSuccess, __tsplusTrace) {
|
|
1507
|
+
return ma => {
|
|
1508
|
+
return matchCauseIO_1(cause => tsplus_module_6.match(([e, trace]) => onFailure(e, trace), failCauseNow_1)(tsplus_module_5.failureTraceOrCause(cause)), onSuccess, __tsplusTrace)(ma);
|
|
1509
|
+
};
|
|
1438
1510
|
}
|
|
1439
1511
|
/**
|
|
1440
1512
|
* @tsplus getter fncts.io.IO maybe
|
|
@@ -1442,7 +1514,7 @@ function matchTraceIO_(ma, onFailure, onSuccess, __tsplusTrace) {
|
|
|
1442
1514
|
|
|
1443
1515
|
|
|
1444
1516
|
function maybe(io, __tsplusTrace) {
|
|
1445
|
-
return match_1(
|
|
1517
|
+
return match_1(() => tsplus_module_2.nothing(), tsplus_module_2.just, __tsplusTrace)(io);
|
|
1446
1518
|
}
|
|
1447
1519
|
/**
|
|
1448
1520
|
* @tsplus getter fncts.io.IO merge
|
|
@@ -1450,7 +1522,7 @@ function maybe(io, __tsplusTrace) {
|
|
|
1450
1522
|
|
|
1451
1523
|
|
|
1452
1524
|
function merge(io, __tsplusTrace) {
|
|
1453
|
-
return matchIO_1(
|
|
1525
|
+
return matchIO_1(succeedNow_1, succeedNow_1, __tsplusTrace)(io);
|
|
1454
1526
|
}
|
|
1455
1527
|
/**
|
|
1456
1528
|
* Merges an `Iterable<IO>` to a single IO, working sequentially.
|
|
@@ -1459,8 +1531,8 @@ function merge(io, __tsplusTrace) {
|
|
|
1459
1531
|
*/
|
|
1460
1532
|
|
|
1461
1533
|
|
|
1462
|
-
function
|
|
1463
|
-
return
|
|
1534
|
+
function mergeAll(fas, b, f, __tsplusTrace) {
|
|
1535
|
+
return tsplus_module_12.foldLeft(succeed_1(() => b, __tsplusTrace), (b, a) => zipWith_1(a, f, __tsplusTrace)(b))(fas);
|
|
1464
1536
|
}
|
|
1465
1537
|
/**
|
|
1466
1538
|
* Returns a `IO` that will never produce anything. The moral equivalent of
|
|
@@ -1475,8 +1547,8 @@ const never = /*#__PURE__*/defer_1(() => asyncInterrupt_1(() => {
|
|
|
1475
1547
|
}, 60000);
|
|
1476
1548
|
return tsplus_module_3.left(succeed_1(() => {
|
|
1477
1549
|
clearInterval(interval);
|
|
1478
|
-
}, fileName_1 + ":
|
|
1479
|
-
}), fileName_1 + ":
|
|
1550
|
+
}, fileName_1 + ":1456:17"));
|
|
1551
|
+
}), fileName_1 + ":1450:39");
|
|
1480
1552
|
/**
|
|
1481
1553
|
* Converts an option on errors into an option on values.
|
|
1482
1554
|
*
|
|
@@ -1486,7 +1558,7 @@ const never = /*#__PURE__*/defer_1(() => asyncInterrupt_1(() => {
|
|
|
1486
1558
|
exports.never = never;
|
|
1487
1559
|
|
|
1488
1560
|
function optional(ma, __tsplusTrace) {
|
|
1489
|
-
return matchIO_1(
|
|
1561
|
+
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);
|
|
1490
1562
|
}
|
|
1491
1563
|
/**
|
|
1492
1564
|
* Returns the logical disjunction of the `Boolean` value returned by this
|
|
@@ -1494,52 +1566,65 @@ function optional(ma, __tsplusTrace) {
|
|
|
1494
1566
|
* operator has "short circuiting" behavior so if the value returned by this
|
|
1495
1567
|
* effect is true the specified effect will not be evaluated.
|
|
1496
1568
|
*
|
|
1497
|
-
* @tsplus
|
|
1569
|
+
* @tsplus pipeable fncts.io.IO or
|
|
1570
|
+
* @tsplus pipeable-operator fncts.io.IO ||
|
|
1498
1571
|
*/
|
|
1499
1572
|
|
|
1500
1573
|
|
|
1501
|
-
function
|
|
1502
|
-
return
|
|
1574
|
+
function or(mb, __tsplusTrace) {
|
|
1575
|
+
return ma => {
|
|
1576
|
+
return flatMap_1(b => b ? succeedNow_1(true, __tsplusTrace) : mb, __tsplusTrace)(ma);
|
|
1577
|
+
};
|
|
1503
1578
|
}
|
|
1504
1579
|
/**
|
|
1505
|
-
* @tsplus
|
|
1580
|
+
* @tsplus pipeable fncts.io.IO orElse
|
|
1506
1581
|
*/
|
|
1507
1582
|
|
|
1508
1583
|
|
|
1509
|
-
function orElse_1(
|
|
1510
|
-
return
|
|
1584
|
+
function orElse_1(that, __tsplusTrace) {
|
|
1585
|
+
return ma => {
|
|
1586
|
+
return tryOrElse_1(that, succeedNow_1, __tsplusTrace)(ma);
|
|
1587
|
+
};
|
|
1511
1588
|
}
|
|
1512
1589
|
/**
|
|
1513
|
-
* @tsplus
|
|
1590
|
+
* @tsplus pipeable fncts.io.IO orElseEither
|
|
1514
1591
|
*/
|
|
1515
1592
|
|
|
1516
1593
|
|
|
1517
|
-
function
|
|
1518
|
-
return
|
|
1594
|
+
function orElseEither(that, __tsplusTrace) {
|
|
1595
|
+
return self => {
|
|
1596
|
+
return tryOrElse_1(() => map_1(tsplus_module_3.right, __tsplusTrace)(that()), a => succeedNow_1(tsplus_module_3.left(a), __tsplusTrace), __tsplusTrace)(self);
|
|
1597
|
+
};
|
|
1519
1598
|
}
|
|
1520
1599
|
/**
|
|
1521
|
-
* @tsplus
|
|
1600
|
+
* @tsplus pipeable fncts.io.IO orElseFail
|
|
1522
1601
|
*/
|
|
1523
1602
|
|
|
1524
1603
|
|
|
1525
|
-
function
|
|
1526
|
-
return
|
|
1604
|
+
function orElseFail(e, __tsplusTrace) {
|
|
1605
|
+
return ma => {
|
|
1606
|
+
return orElse_1(() => fail_1(e, __tsplusTrace), __tsplusTrace)(ma);
|
|
1607
|
+
};
|
|
1527
1608
|
}
|
|
1528
1609
|
/**
|
|
1529
|
-
* @tsplus
|
|
1610
|
+
* @tsplus pipeable fncts.io.IO orElseMaybe
|
|
1530
1611
|
*/
|
|
1531
1612
|
|
|
1532
1613
|
|
|
1533
|
-
function
|
|
1534
|
-
return
|
|
1614
|
+
function orElseMaybe(that, __tsplusTrace) {
|
|
1615
|
+
return ma => {
|
|
1616
|
+
return catchAll_1(me => tsplus_module_4.match(that, e => fail_1(() => tsplus_module_2.just(e), __tsplusTrace))(me), __tsplusTrace)(ma);
|
|
1617
|
+
};
|
|
1535
1618
|
}
|
|
1536
1619
|
/**
|
|
1537
|
-
* @tsplus
|
|
1620
|
+
* @tsplus pipeable fncts.io.IO orElseSucceed
|
|
1538
1621
|
*/
|
|
1539
1622
|
|
|
1540
1623
|
|
|
1541
|
-
function
|
|
1542
|
-
return
|
|
1624
|
+
function orElseSucceed(a, __tsplusTrace) {
|
|
1625
|
+
return ma => {
|
|
1626
|
+
return orElse_1(() => succeed_1(a, __tsplusTrace), __tsplusTrace)(ma);
|
|
1627
|
+
};
|
|
1543
1628
|
}
|
|
1544
1629
|
/**
|
|
1545
1630
|
* @tsplus getter fncts.io.IO orHalt
|
|
@@ -1547,7 +1632,7 @@ function orElseSucceed_(ma, a, __tsplusTrace) {
|
|
|
1547
1632
|
|
|
1548
1633
|
|
|
1549
1634
|
function orHalt(ma, __tsplusTrace) {
|
|
1550
|
-
return orHaltWith_1(
|
|
1635
|
+
return orHaltWith_1(_function.identity, __tsplusTrace)(ma);
|
|
1551
1636
|
}
|
|
1552
1637
|
/**
|
|
1553
1638
|
* @tsplus getter fncts.io.IO orHaltKeep
|
|
@@ -1555,33 +1640,37 @@ function orHalt(ma, __tsplusTrace) {
|
|
|
1555
1640
|
|
|
1556
1641
|
|
|
1557
1642
|
function orHaltKeep(ma, __tsplusTrace) {
|
|
1558
|
-
return matchCauseIO_1(
|
|
1643
|
+
return matchCauseIO_1(cause => failCauseNow_1(tsplus_module_5.flatMap(tsplus_module_5.halt)(cause), __tsplusTrace), succeedNow_1, __tsplusTrace)(ma);
|
|
1559
1644
|
}
|
|
1560
1645
|
/**
|
|
1561
|
-
* @tsplus
|
|
1646
|
+
* @tsplus pipeable fncts.io.IO orHaltWith
|
|
1562
1647
|
*/
|
|
1563
1648
|
|
|
1564
1649
|
|
|
1565
|
-
function orHaltWith_1(
|
|
1566
|
-
return
|
|
1650
|
+
function orHaltWith_1(f, __tsplusTrace) {
|
|
1651
|
+
return ma => {
|
|
1652
|
+
return matchIO_1(e => haltNow_1(f(e), __tsplusTrace), succeedNow_1, __tsplusTrace)(ma);
|
|
1653
|
+
};
|
|
1567
1654
|
}
|
|
1568
1655
|
/**
|
|
1569
1656
|
* Exposes all parallel errors in a single call
|
|
1570
1657
|
*
|
|
1571
|
-
* @tsplus
|
|
1658
|
+
* @tsplus pipeable fncts.io.IO concurrentErrors
|
|
1572
1659
|
*/
|
|
1573
1660
|
|
|
1574
1661
|
|
|
1575
|
-
function
|
|
1576
|
-
return
|
|
1577
|
-
|
|
1662
|
+
function concurrentErrors(__tsplusTrace) {
|
|
1663
|
+
return io => {
|
|
1664
|
+
return matchCauseIO_1(cause => {
|
|
1665
|
+
const f = tsplus_module_5.failures(cause);
|
|
1578
1666
|
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1667
|
+
if (tsplus_module_19.length(f) === 0) {
|
|
1668
|
+
return failCauseNow_1(cause, __tsplusTrace);
|
|
1669
|
+
} else {
|
|
1670
|
+
return failNow_1(f, __tsplusTrace);
|
|
1671
|
+
}
|
|
1672
|
+
}, succeedNow_1, __tsplusTrace)(io);
|
|
1673
|
+
};
|
|
1585
1674
|
}
|
|
1586
1675
|
/**
|
|
1587
1676
|
* Feeds elements of type `A` to a function `f` that returns an IO.
|
|
@@ -1591,118 +1680,140 @@ function parallelErrors(io, __tsplusTrace) {
|
|
|
1591
1680
|
*/
|
|
1592
1681
|
|
|
1593
1682
|
|
|
1594
|
-
function
|
|
1595
|
-
return map_1(foreach_1(as, a => either_1(f(a), __tsplusTrace), __tsplusTrace)
|
|
1683
|
+
function partition(as, f, __tsplusTrace) {
|
|
1684
|
+
return map_1(c => tsplus_module_11.separate(c), __tsplusTrace)(foreach_1(as, a => either_1(f(a), __tsplusTrace), __tsplusTrace));
|
|
1596
1685
|
}
|
|
1597
1686
|
/**
|
|
1598
1687
|
* Keeps some of the errors, and terminates the fiber with the rest
|
|
1599
1688
|
*
|
|
1600
|
-
* @tsplus
|
|
1689
|
+
* @tsplus pipeable fncts.io.IO refineOrHalt
|
|
1601
1690
|
*/
|
|
1602
1691
|
|
|
1603
1692
|
|
|
1604
|
-
function
|
|
1605
|
-
return
|
|
1693
|
+
function refineOrHalt(pf, __tsplusTrace) {
|
|
1694
|
+
return fa => {
|
|
1695
|
+
return refineOrHaltWith_1(pf, _function.identity, __tsplusTrace)(fa);
|
|
1696
|
+
};
|
|
1606
1697
|
}
|
|
1607
1698
|
/**
|
|
1608
1699
|
* Keeps some of the errors, and terminates the fiber with the rest, using
|
|
1609
1700
|
* the specified function to convert the `E` into a `Throwable`.
|
|
1610
1701
|
*
|
|
1611
|
-
* @tsplus
|
|
1702
|
+
* @tsplus pipeable fncts.io.IO refineOrHaltWith
|
|
1612
1703
|
*/
|
|
1613
1704
|
|
|
1614
1705
|
|
|
1615
|
-
function refineOrHaltWith_1(
|
|
1616
|
-
return
|
|
1706
|
+
function refineOrHaltWith_1(pf, f, __tsplusTrace) {
|
|
1707
|
+
return fa => {
|
|
1708
|
+
return catchAll_1(e => tsplus_module_4.match(() => haltNow_1(f(e), __tsplusTrace), failNow_1)(pf(e)), __tsplusTrace)(fa);
|
|
1709
|
+
};
|
|
1617
1710
|
}
|
|
1618
1711
|
/**
|
|
1619
1712
|
* Fail with the returned value if the partial function `pf` matches, otherwise
|
|
1620
1713
|
* continue with the held value.
|
|
1621
1714
|
*
|
|
1622
|
-
* @tsplus
|
|
1715
|
+
* @tsplus pipeable fncts.io.IO reject
|
|
1623
1716
|
*/
|
|
1624
1717
|
|
|
1625
1718
|
|
|
1626
|
-
function
|
|
1627
|
-
return
|
|
1719
|
+
function reject(pf, __tsplusTrace) {
|
|
1720
|
+
return fa => {
|
|
1721
|
+
return rejectIO_1(a => tsplus_module_8.map(failNow_1)(pf(a)), __tsplusTrace)(fa);
|
|
1722
|
+
};
|
|
1628
1723
|
}
|
|
1629
1724
|
/**
|
|
1630
1725
|
* Continue with the returned computation if the partial function `pf` matches,
|
|
1631
1726
|
* translating the successful match into a failure, otherwise continue with
|
|
1632
1727
|
* the held value.
|
|
1633
1728
|
*
|
|
1634
|
-
* @tsplus
|
|
1729
|
+
* @tsplus pipeable fncts.io.IO rejectIO
|
|
1635
1730
|
*/
|
|
1636
1731
|
|
|
1637
1732
|
|
|
1638
|
-
function rejectIO_1(
|
|
1639
|
-
return
|
|
1733
|
+
function rejectIO_1(pf, __tsplusTrace) {
|
|
1734
|
+
return fa => {
|
|
1735
|
+
return flatMap_1(a => tsplus_module_4.match(() => succeedNow_1(a, __tsplusTrace), io => flatMap_1(failNow_1, __tsplusTrace)(io))(pf(a)), __tsplusTrace)(fa);
|
|
1736
|
+
};
|
|
1640
1737
|
}
|
|
1641
1738
|
/**
|
|
1642
1739
|
* Repeats this effect the specified number of times.
|
|
1643
1740
|
*
|
|
1644
|
-
* @tsplus
|
|
1741
|
+
* @tsplus pipeable fncts.io.IO repeatN
|
|
1645
1742
|
*/
|
|
1646
1743
|
|
|
1647
1744
|
|
|
1648
|
-
function repeatN_1(
|
|
1649
|
-
return
|
|
1745
|
+
function repeatN_1(n, __tsplusTrace) {
|
|
1746
|
+
return ma => {
|
|
1747
|
+
return flatMap_1(a => n <= 0 ? succeed_1(() => a, __tsplusTrace) : repeatN_1(n - 1, __tsplusTrace)(ma), __tsplusTrace)(ma);
|
|
1748
|
+
};
|
|
1650
1749
|
}
|
|
1651
1750
|
/**
|
|
1652
1751
|
* Repeats this effect until its result satisfies the specified predicate.
|
|
1653
1752
|
*
|
|
1654
|
-
* @tsplus
|
|
1753
|
+
* @tsplus pipeable fncts.io.IO repeatUntil
|
|
1655
1754
|
*/
|
|
1656
1755
|
|
|
1657
1756
|
|
|
1658
|
-
function
|
|
1659
|
-
return
|
|
1757
|
+
function repeatUntil(f, __tsplusTrace) {
|
|
1758
|
+
return ma => {
|
|
1759
|
+
return repeatUntilIO_1(a => succeedNow_1(f(a), __tsplusTrace), __tsplusTrace)(ma);
|
|
1760
|
+
};
|
|
1660
1761
|
}
|
|
1661
1762
|
/**
|
|
1662
1763
|
* Repeats this effect until its error satisfies the specified effectful predicate.
|
|
1663
1764
|
*
|
|
1664
|
-
* @tsplus
|
|
1765
|
+
* @tsplus pipeable fncts.io.IO repeatUntilIO
|
|
1665
1766
|
*/
|
|
1666
1767
|
|
|
1667
1768
|
|
|
1668
|
-
function repeatUntilIO_1(
|
|
1669
|
-
return
|
|
1769
|
+
function repeatUntilIO_1(f, __tsplusTrace) {
|
|
1770
|
+
return ma => {
|
|
1771
|
+
return flatMap_1(a => flatMap_1(b => b ? succeed_1(() => a, __tsplusTrace) : repeatUntilIO_1(f, __tsplusTrace)(ma), __tsplusTrace)(f(a)), __tsplusTrace)(ma);
|
|
1772
|
+
};
|
|
1670
1773
|
}
|
|
1671
1774
|
/**
|
|
1672
1775
|
* Repeats this effect while its error satisfies the specified predicate.
|
|
1673
1776
|
*
|
|
1674
|
-
* @tsplus
|
|
1777
|
+
* @tsplus pipeable fncts.io.IO repeatWhile
|
|
1675
1778
|
*/
|
|
1676
1779
|
|
|
1677
1780
|
|
|
1678
|
-
function
|
|
1679
|
-
return
|
|
1781
|
+
function repeatWhile(f, __tsplusTrace) {
|
|
1782
|
+
return ma => {
|
|
1783
|
+
return repeatWhileIO_1(a => succeedNow_1(f(a), __tsplusTrace), __tsplusTrace)(ma);
|
|
1784
|
+
};
|
|
1680
1785
|
}
|
|
1681
1786
|
/**
|
|
1682
1787
|
* Repeats this effect while its error satisfies the specified effectful predicate.
|
|
1683
1788
|
*
|
|
1684
|
-
* @tsplus
|
|
1789
|
+
* @tsplus pipeable fncts.io.IO repeatWhileIO
|
|
1685
1790
|
*/
|
|
1686
1791
|
|
|
1687
1792
|
|
|
1688
|
-
function repeatWhileIO_1(
|
|
1689
|
-
return
|
|
1793
|
+
function repeatWhileIO_1(f, __tsplusTrace) {
|
|
1794
|
+
return ma => {
|
|
1795
|
+
return flatMap_1(a => flatMap_1(b => b ? repeatWhileIO_1(f, __tsplusTrace)(ma) : succeed_1(() => a, __tsplusTrace), __tsplusTrace)(f(a)), __tsplusTrace)(ma);
|
|
1796
|
+
};
|
|
1690
1797
|
}
|
|
1691
1798
|
/**
|
|
1692
|
-
* @tsplus
|
|
1799
|
+
* @tsplus pipeable fncts.io.IO replicate
|
|
1693
1800
|
*/
|
|
1694
1801
|
|
|
1695
1802
|
|
|
1696
|
-
function
|
|
1697
|
-
return
|
|
1803
|
+
function replicate(n, __tsplusTrace) {
|
|
1804
|
+
return self => {
|
|
1805
|
+
return tsplus_module_21.map(() => self)(tsplus_module_20.range(0, n));
|
|
1806
|
+
};
|
|
1698
1807
|
}
|
|
1699
1808
|
/**
|
|
1700
|
-
* @tsplus
|
|
1809
|
+
* @tsplus pipeable fncts.io.IO require
|
|
1701
1810
|
*/
|
|
1702
1811
|
|
|
1703
1812
|
|
|
1704
|
-
function
|
|
1705
|
-
return
|
|
1813
|
+
function _require(error, __tsplusTrace) {
|
|
1814
|
+
return ma => {
|
|
1815
|
+
return flatMap_1(ma => tsplus_module_4.match(() => fail_1(error, __tsplusTrace), succeedNow_1)(ma), __tsplusTrace)(ma);
|
|
1816
|
+
};
|
|
1706
1817
|
}
|
|
1707
1818
|
/**
|
|
1708
1819
|
* Returns an IO that semantically runs the IO on a fiber,
|
|
@@ -1713,7 +1824,7 @@ function require_(ma, error, __tsplusTrace) {
|
|
|
1713
1824
|
|
|
1714
1825
|
|
|
1715
1826
|
function result(ma, __tsplusTrace) {
|
|
1716
|
-
return matchCauseIO_1(
|
|
1827
|
+
return matchCauseIO_1(cause => succeedNow_1(tsplus_module_10.failCause(cause), __tsplusTrace), a => succeedNow_1(tsplus_module_10.succeed(a), __tsplusTrace), __tsplusTrace)(ma);
|
|
1717
1828
|
}
|
|
1718
1829
|
/**
|
|
1719
1830
|
* Recover from the unchecked failure of the `IO`. (opposite of `orHalt`)
|
|
@@ -1723,47 +1834,55 @@ function result(ma, __tsplusTrace) {
|
|
|
1723
1834
|
|
|
1724
1835
|
|
|
1725
1836
|
function resurrect(io, __tsplusTrace) {
|
|
1726
|
-
return unrefineWith_1(
|
|
1837
|
+
return unrefineWith_1(tsplus_module_2.just, _function.identity, __tsplusTrace)(io);
|
|
1727
1838
|
}
|
|
1728
1839
|
/**
|
|
1729
1840
|
* Retries this effect until its error satisfies the specified predicate.
|
|
1730
1841
|
*
|
|
1731
|
-
* @tsplus
|
|
1842
|
+
* @tsplus pipeable fncts.io.IO retryUntil
|
|
1732
1843
|
*/
|
|
1733
1844
|
|
|
1734
1845
|
|
|
1735
|
-
function
|
|
1736
|
-
return
|
|
1846
|
+
function retryUntil(f, __tsplusTrace) {
|
|
1847
|
+
return fa => {
|
|
1848
|
+
return retryUntilIO_1(e => succeedNow_1(f(e), __tsplusTrace), __tsplusTrace)(fa);
|
|
1849
|
+
};
|
|
1737
1850
|
}
|
|
1738
1851
|
/**
|
|
1739
1852
|
* Retries this effect until its error satisfies the specified effectful predicate.
|
|
1740
1853
|
*
|
|
1741
|
-
* @tsplus
|
|
1854
|
+
* @tsplus pipeable fncts.io.IO retryUntilIO
|
|
1742
1855
|
*/
|
|
1743
1856
|
|
|
1744
1857
|
|
|
1745
|
-
function retryUntilIO_1(
|
|
1746
|
-
return
|
|
1858
|
+
function retryUntilIO_1(f, __tsplusTrace) {
|
|
1859
|
+
return fa => {
|
|
1860
|
+
return catchAll_1(e => flatMap_1(b => b ? failNow_1(e, __tsplusTrace) : retryUntilIO_1(f, __tsplusTrace)(fa), __tsplusTrace)(f(e)), __tsplusTrace)(fa);
|
|
1861
|
+
};
|
|
1747
1862
|
}
|
|
1748
1863
|
/**
|
|
1749
1864
|
* Retries this effect while its error satisfies the specified predicate.
|
|
1750
1865
|
*
|
|
1751
|
-
* @tsplus
|
|
1866
|
+
* @tsplus pipeable fncts.io.IO retryWhile
|
|
1752
1867
|
*/
|
|
1753
1868
|
|
|
1754
1869
|
|
|
1755
|
-
function
|
|
1756
|
-
return
|
|
1870
|
+
function retryWhile(f, __tsplusTrace) {
|
|
1871
|
+
return fa => {
|
|
1872
|
+
return retryWhileIO_1(e => succeedNow_1(f(e), __tsplusTrace), __tsplusTrace)(fa);
|
|
1873
|
+
};
|
|
1757
1874
|
}
|
|
1758
1875
|
/**
|
|
1759
1876
|
* Retries this effect while its error satisfies the specified effectful predicate.
|
|
1760
1877
|
*
|
|
1761
|
-
* @tsplus
|
|
1878
|
+
* @tsplus pipeable fncts.io.IO retryWhileIO
|
|
1762
1879
|
*/
|
|
1763
1880
|
|
|
1764
1881
|
|
|
1765
|
-
function retryWhileIO_1(
|
|
1766
|
-
return
|
|
1882
|
+
function retryWhileIO_1(f, __tsplusTrace) {
|
|
1883
|
+
return fa => {
|
|
1884
|
+
return catchAll_1(e => flatMap_1(b => b ? retryWhileIO_1(f, __tsplusTrace)(fa) : fail_1(() => e, __tsplusTrace), __tsplusTrace)(f(e)), __tsplusTrace)(fa);
|
|
1885
|
+
};
|
|
1767
1886
|
}
|
|
1768
1887
|
/**
|
|
1769
1888
|
* Retrieves the runtimeConfig that this effect is running on.
|
|
@@ -1772,7 +1891,7 @@ function retryWhileIO_1(fa, f, __tsplusTrace) {
|
|
|
1772
1891
|
*/
|
|
1773
1892
|
|
|
1774
1893
|
|
|
1775
|
-
const runtimeConfig = /*#__PURE__*/deferWith_1(runtimeConfig => succeedNow_1(runtimeConfig, fileName_1 + ":
|
|
1894
|
+
const runtimeConfig = /*#__PURE__*/deferWith_1(runtimeConfig => succeedNow_1(runtimeConfig, fileName_1 + ":1787:95"), fileName_1 + ":1787:62");
|
|
1776
1895
|
/**
|
|
1777
1896
|
* Exposes the full cause of failure of this effect.
|
|
1778
1897
|
*
|
|
@@ -1782,15 +1901,17 @@ const runtimeConfig = /*#__PURE__*/deferWith_1(runtimeConfig => succeedNow_1(run
|
|
|
1782
1901
|
exports.runtimeConfig = runtimeConfig;
|
|
1783
1902
|
|
|
1784
1903
|
function sandbox_1(fa, __tsplusTrace) {
|
|
1785
|
-
return matchCauseIO_1(
|
|
1904
|
+
return matchCauseIO_1(failNow_1, succeedNow_1, __tsplusTrace)(fa);
|
|
1786
1905
|
}
|
|
1787
1906
|
/**
|
|
1788
|
-
* @tsplus
|
|
1907
|
+
* @tsplus pipeable fncts.io.IO sandboxWith
|
|
1789
1908
|
*/
|
|
1790
1909
|
|
|
1791
1910
|
|
|
1792
|
-
function
|
|
1793
|
-
return
|
|
1911
|
+
function sandboxWith(f, __tsplusTrace) {
|
|
1912
|
+
return ma => {
|
|
1913
|
+
return unsandbox_1(f(sandbox_1(ma, __tsplusTrace)), __tsplusTrace);
|
|
1914
|
+
};
|
|
1794
1915
|
}
|
|
1795
1916
|
/**
|
|
1796
1917
|
* Sets the runtime configuration to the specified value.
|
|
@@ -1841,17 +1962,19 @@ function succeed_1(effect, __tsplusTrace) {
|
|
|
1841
1962
|
return new _definition2.Succeed(effect, __tsplusTrace);
|
|
1842
1963
|
}
|
|
1843
1964
|
/**
|
|
1844
|
-
* @tsplus
|
|
1965
|
+
* @tsplus pipeable fncts.io.IO summarized
|
|
1845
1966
|
*/
|
|
1846
1967
|
|
|
1847
1968
|
|
|
1848
|
-
function summarized_1(
|
|
1849
|
-
return
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1969
|
+
function summarized_1(summary, f, __tsplusTrace) {
|
|
1970
|
+
return ma => {
|
|
1971
|
+
return gen_1(function* (_) {
|
|
1972
|
+
const start = yield* _(summary, __tsplusTrace);
|
|
1973
|
+
const value = yield* _(ma, __tsplusTrace);
|
|
1974
|
+
const end = yield* _(summary, __tsplusTrace);
|
|
1975
|
+
return (0, _function.tuple)(f(start, end), value);
|
|
1976
|
+
}, __tsplusTrace);
|
|
1977
|
+
};
|
|
1855
1978
|
}
|
|
1856
1979
|
/**
|
|
1857
1980
|
* Swaps the positions of a Bifunctor's arguments
|
|
@@ -1861,27 +1984,27 @@ function summarized_1(ma, summary, f, __tsplusTrace) {
|
|
|
1861
1984
|
|
|
1862
1985
|
|
|
1863
1986
|
function swap_1(pab, __tsplusTrace) {
|
|
1864
|
-
return matchIO_1(
|
|
1987
|
+
return matchIO_1(succeedNow_1, failNow_1, __tsplusTrace)(pab);
|
|
1865
1988
|
}
|
|
1866
1989
|
/**
|
|
1867
1990
|
* Swaps the error/value parameters, applies the function `f` and flips the parameters back
|
|
1868
1991
|
*
|
|
1869
|
-
* @tsplus
|
|
1992
|
+
* @tsplus pipeable fncts.io.IO swapWith
|
|
1870
1993
|
*/
|
|
1871
1994
|
|
|
1872
1995
|
|
|
1873
|
-
function swapWith_1(
|
|
1874
|
-
return swap_1(f(swap_1(fa, __tsplusTrace)), __tsplusTrace);
|
|
1996
|
+
function swapWith_1(f, __tsplusTrace) {
|
|
1997
|
+
return fa => swap_1(f(swap_1(fa, __tsplusTrace)), __tsplusTrace);
|
|
1875
1998
|
}
|
|
1876
1999
|
/**
|
|
1877
2000
|
* A more powerful variation of `timed` that allows specifying the clock.
|
|
1878
2001
|
*
|
|
1879
|
-
* @tsplus
|
|
2002
|
+
* @tsplus pipeable fncts.io.IO timedWith
|
|
1880
2003
|
*/
|
|
1881
2004
|
|
|
1882
2005
|
|
|
1883
|
-
function
|
|
1884
|
-
return summarized_1(
|
|
2006
|
+
function timedWith(msTime, __tsplusTrace) {
|
|
2007
|
+
return ma => summarized_1(msTime, (start, end) => end - start, __tsplusTrace)(ma);
|
|
1885
2008
|
}
|
|
1886
2009
|
/**
|
|
1887
2010
|
* Creates a `IO` that has succeeded with a pure value
|
|
@@ -1895,7 +2018,7 @@ function tryCatch_1(effect, onThrow, __tsplusTrace) {
|
|
|
1895
2018
|
try {
|
|
1896
2019
|
return effect();
|
|
1897
2020
|
} catch (u) {
|
|
1898
|
-
throw new _definition2.IOError(
|
|
2021
|
+
throw new _definition2.IOError(tsplus_module_10.fail(onThrow(u)));
|
|
1899
2022
|
}
|
|
1900
2023
|
}, __tsplusTrace);
|
|
1901
2024
|
}
|
|
@@ -1907,7 +2030,7 @@ function tryCatch_1(effect, onThrow, __tsplusTrace) {
|
|
|
1907
2030
|
|
|
1908
2031
|
|
|
1909
2032
|
function absolve(ma, __tsplusTrace) {
|
|
1910
|
-
return flatMap_1(
|
|
2033
|
+
return flatMap_1(ea => tsplus_module_6.match(failNow_1, succeedNow_1)(ea), __tsplusTrace)(ma);
|
|
1911
2034
|
}
|
|
1912
2035
|
/**
|
|
1913
2036
|
* Composes computations in sequence, using the return value of one computation as input for the next
|
|
@@ -1915,59 +2038,67 @@ function absolve(ma, __tsplusTrace) {
|
|
|
1915
2038
|
*
|
|
1916
2039
|
* Returns an IO that effectfully "peeks" at the success of this effect.
|
|
1917
2040
|
*
|
|
1918
|
-
* @tsplus
|
|
2041
|
+
* @tsplus pipeable fncts.io.IO tap
|
|
1919
2042
|
*/
|
|
1920
2043
|
|
|
1921
2044
|
|
|
1922
|
-
function
|
|
1923
|
-
return
|
|
2045
|
+
function tap(f, __tsplusTrace) {
|
|
2046
|
+
return self => {
|
|
2047
|
+
return flatMap_1(a => map_1(() => a, __tsplusTrace)(f(a)), __tsplusTrace)(self);
|
|
2048
|
+
};
|
|
1924
2049
|
}
|
|
1925
2050
|
/**
|
|
1926
2051
|
* Returns an IO that effectually "peeks" at the cause of the failure of
|
|
1927
2052
|
* this IO.
|
|
1928
2053
|
*
|
|
1929
|
-
* @tsplus
|
|
2054
|
+
* @tsplus pipeable fncts.io.IO tapCause
|
|
1930
2055
|
*/
|
|
1931
2056
|
|
|
1932
2057
|
|
|
1933
|
-
function
|
|
1934
|
-
return
|
|
2058
|
+
function tapCause(f, __tsplusTrace) {
|
|
2059
|
+
return ma => {
|
|
2060
|
+
return matchCauseIO_1(c => flatMap_1(() => failCauseNow_1(c, __tsplusTrace), __tsplusTrace)(f(c)), succeedNow_1, __tsplusTrace)(ma);
|
|
2061
|
+
};
|
|
1935
2062
|
}
|
|
1936
2063
|
/**
|
|
1937
2064
|
* Returns an IO that effectfully "peeks" at the failure of this effect.
|
|
1938
2065
|
*
|
|
1939
|
-
* @tsplus
|
|
2066
|
+
* @tsplus pipeable fncts.io.IO tapError
|
|
1940
2067
|
*/
|
|
1941
2068
|
|
|
1942
2069
|
|
|
1943
|
-
function
|
|
1944
|
-
return matchCauseIO_1(
|
|
2070
|
+
function tapError(f, __tsplusTrace) {
|
|
2071
|
+
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);
|
|
1945
2072
|
}
|
|
1946
2073
|
/**
|
|
1947
2074
|
* Returns an effect that effectually "peeks" at the cause of the failure of
|
|
1948
2075
|
* this effect.
|
|
1949
2076
|
*
|
|
1950
|
-
* @tsplus
|
|
2077
|
+
* @tsplus pipeable fncts.io.IO tapErrorCause
|
|
1951
2078
|
*/
|
|
1952
2079
|
|
|
1953
2080
|
|
|
1954
|
-
function
|
|
1955
|
-
return
|
|
2081
|
+
function tapErrorCause(f, __tsplusTrace) {
|
|
2082
|
+
return self => {
|
|
2083
|
+
return matchCauseIO_1(cause => apSecond_1(failCauseNow_1(cause, __tsplusTrace), __tsplusTrace)(f(cause)), succeedNow_1, __tsplusTrace)(self);
|
|
2084
|
+
};
|
|
1956
2085
|
}
|
|
1957
2086
|
/**
|
|
1958
|
-
* @tsplus
|
|
2087
|
+
* @tsplus pipeable fncts.io.IO tryOrElse
|
|
1959
2088
|
*/
|
|
1960
2089
|
|
|
1961
2090
|
|
|
1962
|
-
function tryOrElse_1(
|
|
1963
|
-
return
|
|
2091
|
+
function tryOrElse_1(that, onSuccess, __tsplusTrace) {
|
|
2092
|
+
return ma => {
|
|
2093
|
+
return matchCauseIO_1(cause => tsplus_module_4.match(that, failCauseNow_1)(tsplus_module_5.keepDefects(cause)), onSuccess, __tsplusTrace)(ma);
|
|
2094
|
+
};
|
|
1964
2095
|
}
|
|
1965
2096
|
/**
|
|
1966
2097
|
* @tsplus static fncts.io.IOOps unit
|
|
1967
2098
|
*/
|
|
1968
2099
|
|
|
1969
2100
|
|
|
1970
|
-
const unit_1 = /*#__PURE__*/succeedNow_1(undefined, fileName_1 + ":
|
|
2101
|
+
const unit_1 = /*#__PURE__*/succeedNow_1(undefined, fileName_1 + ":1987:45");
|
|
1971
2102
|
const unit = unit_1;
|
|
1972
2103
|
/**
|
|
1973
2104
|
* Converts an option on errors into an option on values.
|
|
@@ -1978,18 +2109,20 @@ const unit = unit_1;
|
|
|
1978
2109
|
exports.unit = unit;
|
|
1979
2110
|
|
|
1980
2111
|
function unjust(self, __tsplusTrace) {
|
|
1981
|
-
return matchIO_1(
|
|
2112
|
+
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);
|
|
1982
2113
|
}
|
|
1983
2114
|
/**
|
|
1984
2115
|
* Takes some fiber failures and converts them into errors, using the
|
|
1985
2116
|
* specified function to convert the `E` into an `E1 | E2`.
|
|
1986
2117
|
*
|
|
1987
|
-
* @tsplus
|
|
2118
|
+
* @tsplus pipeable fncts.io.IO unrefineWith
|
|
1988
2119
|
*/
|
|
1989
2120
|
|
|
1990
2121
|
|
|
1991
|
-
function unrefineWith_1(
|
|
1992
|
-
return
|
|
2122
|
+
function unrefineWith_1(pf, f, __tsplusTrace) {
|
|
2123
|
+
return fa => {
|
|
2124
|
+
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);
|
|
2125
|
+
};
|
|
1993
2126
|
}
|
|
1994
2127
|
/**
|
|
1995
2128
|
* The inverse operation `sandbox`
|
|
@@ -1999,7 +2132,7 @@ function unrefineWith_1(fa, pf, f, __tsplusTrace) {
|
|
|
1999
2132
|
|
|
2000
2133
|
|
|
2001
2134
|
function unsandbox_1(ma, __tsplusTrace) {
|
|
2002
|
-
return mapErrorCause_1(
|
|
2135
|
+
return mapErrorCause_1(cause => tsplus_module_5.flatten(cause), __tsplusTrace)(ma);
|
|
2003
2136
|
}
|
|
2004
2137
|
/**
|
|
2005
2138
|
* Updates the `FiberRef` values for the fiber running this effect using the
|
|
@@ -2030,23 +2163,27 @@ function withFiberContext_1(onState, __tsplusTrace) {
|
|
|
2030
2163
|
|
|
2031
2164
|
const via = _function.pipe;
|
|
2032
2165
|
/**
|
|
2033
|
-
* @tsplus
|
|
2166
|
+
* @tsplus pipeable fncts.io.IO when
|
|
2034
2167
|
*/
|
|
2035
2168
|
|
|
2036
2169
|
exports.via = via;
|
|
2037
2170
|
|
|
2038
|
-
function
|
|
2039
|
-
return
|
|
2171
|
+
function when(b, __tsplusTrace) {
|
|
2172
|
+
return ma => {
|
|
2173
|
+
return whenIO_1(succeed_1(b, __tsplusTrace), __tsplusTrace)(ma);
|
|
2174
|
+
};
|
|
2040
2175
|
}
|
|
2041
2176
|
/**
|
|
2042
2177
|
* The moral equivalent of `if (p) exp` when `p` has side-effects
|
|
2043
2178
|
*
|
|
2044
|
-
* @tsplus
|
|
2179
|
+
* @tsplus pipeable fncts.io.IO whenIO
|
|
2045
2180
|
*/
|
|
2046
2181
|
|
|
2047
2182
|
|
|
2048
|
-
function whenIO_1(
|
|
2049
|
-
return
|
|
2183
|
+
function whenIO_1(mb, __tsplusTrace) {
|
|
2184
|
+
return ma => {
|
|
2185
|
+
return flatMap_1(b => b ? asUnit_1(ma, __tsplusTrace) : unit_1, __tsplusTrace)(mb);
|
|
2186
|
+
};
|
|
2050
2187
|
}
|
|
2051
2188
|
/**
|
|
2052
2189
|
* Returns an effect that yields to the runtime system, starting on a fresh
|
|
@@ -2060,21 +2197,25 @@ function whenIO_1(ma, mb, __tsplusTrace) {
|
|
|
2060
2197
|
const yieldNow_1 = /*#__PURE__*/new _definition2.Yield();
|
|
2061
2198
|
const yieldNow = yieldNow_1;
|
|
2062
2199
|
/**
|
|
2063
|
-
* @tsplus
|
|
2200
|
+
* @tsplus pipeable fncts.io.IO zip
|
|
2064
2201
|
*/
|
|
2065
2202
|
|
|
2066
2203
|
exports.yieldNow = yieldNow;
|
|
2067
2204
|
|
|
2068
|
-
function
|
|
2069
|
-
return
|
|
2205
|
+
function zip(that, __tsplusTrace) {
|
|
2206
|
+
return self => {
|
|
2207
|
+
return zipWith_1(that, _function.tuple, __tsplusTrace)(self);
|
|
2208
|
+
};
|
|
2070
2209
|
}
|
|
2071
2210
|
/**
|
|
2072
|
-
* @tsplus
|
|
2211
|
+
* @tsplus pipeable fncts.io.IO zipWith
|
|
2073
2212
|
*/
|
|
2074
2213
|
|
|
2075
2214
|
|
|
2076
|
-
function zipWith_1(
|
|
2077
|
-
return
|
|
2215
|
+
function zipWith_1(that, f, __tsplusTrace) {
|
|
2216
|
+
return self => {
|
|
2217
|
+
return flatMap_1(a => map_1(b => f(a, b), __tsplusTrace)(that), __tsplusTrace)(self);
|
|
2218
|
+
};
|
|
2078
2219
|
}
|
|
2079
2220
|
|
|
2080
2221
|
class GenIO {
|
|
@@ -2096,22 +2237,6 @@ class GenIO {
|
|
|
2096
2237
|
exports.GenIO = GenIO;
|
|
2097
2238
|
|
|
2098
2239
|
const __adapter = _ => {
|
|
2099
|
-
// if (Either.isEither(_)) {
|
|
2100
|
-
// return IO.fromEither(_);
|
|
2101
|
-
// }
|
|
2102
|
-
// if (Maybe.isMaybe(_)) {
|
|
2103
|
-
// return __
|
|
2104
|
-
// ? _._tag === "Nothing"
|
|
2105
|
-
// ? IO.failNow(__())
|
|
2106
|
-
// : IO.succeed(_.value)
|
|
2107
|
-
// : getOrFail(_);
|
|
2108
|
-
// }
|
|
2109
|
-
// if (isTag(_)) {
|
|
2110
|
-
// return service(_);
|
|
2111
|
-
// }
|
|
2112
|
-
// if (S.isSync(_)) {
|
|
2113
|
-
// return fromSync(_);
|
|
2114
|
-
// }
|
|
2115
2240
|
return _;
|
|
2116
2241
|
};
|
|
2117
2242
|
|
|
@@ -2141,7 +2266,7 @@ function gen_1(f, __tsplusTrace) {
|
|
|
2141
2266
|
return run(next);
|
|
2142
2267
|
};
|
|
2143
2268
|
|
|
2144
|
-
return flatMap_1(state.value.effect
|
|
2269
|
+
return flatMap_1(f, __tsplusTrace)(state.value.effect);
|
|
2145
2270
|
};
|
|
2146
2271
|
|
|
2147
2272
|
return run(state);
|