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