@fncts/io 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cached/api.d.ts +1 -1
- package/Channel/api.d.ts +80 -80
- package/Channel/core-api.d.ts +26 -26
- package/Console/definition.d.ts +1 -0
- package/CountdownLatch.d.ts +1 -0
- package/Fiber/FiberMessage.d.ts +6 -28
- package/Fiber/FiberRuntime.d.ts +108 -77
- package/Fiber/api/interruptAs.d.ts +2 -2
- package/Fiber/definition.d.ts +2 -0
- package/FiberScope/definition.d.ts +3 -0
- package/FiberSet.d.ts +2 -1
- package/Future/State.d.ts +59 -0
- package/Future/api.d.ts +8 -3
- package/Future/constructors.d.ts +1 -1
- package/Future/definition.d.ts +1 -17
- package/Future.d.ts +1 -0
- package/Hub/api.d.ts +15 -15
- package/IO/api/array.d.ts +22 -0
- package/IO/api/awaitAllChildren.d.ts +6 -0
- package/IO/api/cachedInvalidate.d.ts +15 -0
- package/IO/api/forkDaemon.d.ts +1 -1
- package/IO/api/onTermination.d.ts +1 -2
- package/IO/api/transplant.d.ts +11 -1
- package/IO/api.d.ts +247 -225
- package/IO/definition.d.ts +12 -25
- package/IO.d.ts +3 -1
- package/Random/definition.d.ts +1 -0
- package/Ref/Synchronized/api.d.ts +1 -1
- package/Semaphore/Reservation.d.ts +15 -0
- package/Semaphore/constructors.d.ts +13 -0
- package/Semaphore/definition.d.ts +29 -0
- package/Semaphore.d.ts +3 -40
- package/Stream/api.d.ts +164 -164
- package/_cjs/Cached/api.cjs +1 -2
- package/_cjs/Cached/api.cjs.map +1 -1
- package/_cjs/Cached/internal.cjs +1 -2
- package/_cjs/Cached/internal.cjs.map +1 -1
- package/_cjs/Channel/api/interruptWhen.cjs +1 -2
- package/_cjs/Channel/api/interruptWhen.cjs.map +1 -1
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs +2 -3
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAll.cjs +1 -2
- package/_cjs/Channel/api/mergeAll.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs +1 -2
- package/_cjs/Channel/api/mergeAllUnboundedWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +2 -3
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeMap.cjs +1 -2
- package/_cjs/Channel/api/mergeMap.cjs.map +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +1 -2
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api/run.cjs +1 -2
- package/_cjs/Channel/api/run.cjs.map +1 -1
- package/_cjs/Channel/api/runCollect.cjs +1 -2
- package/_cjs/Channel/api/runCollect.cjs.map +1 -1
- package/_cjs/Channel/api/runDrain.cjs +1 -2
- package/_cjs/Channel/api/runDrain.cjs.map +1 -1
- package/_cjs/Channel/api/runScoped.cjs +3 -4
- package/_cjs/Channel/api/runScoped.cjs.map +1 -1
- package/_cjs/Channel/api/toPull.cjs +2 -3
- package/_cjs/Channel/api/toPull.cjs.map +1 -1
- package/_cjs/Channel/api/zipConcurrent.cjs +1 -2
- package/_cjs/Channel/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +206 -207
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/core-api.cjs +43 -42
- package/_cjs/Channel/core-api.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +4 -5
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelState.cjs +1 -2
- package/_cjs/Channel/internal/ChannelState.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +1 -2
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Clock/api.cjs +1 -2
- package/_cjs/Clock/api.cjs.map +1 -1
- package/_cjs/Clock/definition.cjs +1 -2
- package/_cjs/Clock/definition.cjs.map +1 -1
- package/_cjs/Clock/live.cjs +1 -2
- package/_cjs/Clock/live.cjs.map +1 -1
- package/_cjs/Console/api.cjs +1 -2
- package/_cjs/Console/api.cjs.map +1 -1
- package/_cjs/Console/definition.cjs +2 -2
- package/_cjs/Console/definition.cjs.map +1 -1
- package/_cjs/Console/live.cjs +1 -2
- package/_cjs/Console/live.cjs.map +1 -1
- package/_cjs/CountdownLatch.cjs +3 -3
- package/_cjs/CountdownLatch.cjs.map +1 -1
- package/_cjs/Differ/api.cjs +1 -2
- package/_cjs/Differ/api.cjs.map +1 -1
- package/_cjs/Fiber/FiberMessage.cjs +3 -24
- package/_cjs/Fiber/FiberMessage.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +879 -636
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/api/awaitAll.cjs +1 -2
- package/_cjs/Fiber/api/awaitAll.cjs.map +1 -1
- package/_cjs/Fiber/api/collectAll.cjs +2 -3
- package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
- package/_cjs/Fiber/api/fromIO.cjs +1 -2
- package/_cjs/Fiber/api/fromIO.cjs.map +1 -1
- package/_cjs/Fiber/api/interrupt.cjs +2 -3
- package/_cjs/Fiber/api/interrupt.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAll.cjs +2 -3
- package/_cjs/Fiber/api/interruptAll.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptAs.cjs +5 -10
- package/_cjs/Fiber/api/interruptAs.cjs.map +1 -1
- package/_cjs/Fiber/api/interruptFork.cjs +2 -3
- package/_cjs/Fiber/api/interruptFork.cjs.map +1 -1
- package/_cjs/Fiber/api/join.cjs +1 -2
- package/_cjs/Fiber/api/join.cjs.map +1 -1
- package/_cjs/Fiber/api/joinAll.cjs +1 -2
- package/_cjs/Fiber/api/joinAll.cjs.map +1 -1
- package/_cjs/Fiber/api/mapFiber.cjs +1 -2
- package/_cjs/Fiber/api/mapFiber.cjs.map +1 -1
- package/_cjs/Fiber/api/mapIO.cjs +2 -3
- package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
- package/_cjs/Fiber/api/zipWith.cjs +2 -3
- package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
- package/_cjs/Fiber/constructors.cjs +2 -3
- package/_cjs/Fiber/constructors.cjs.map +1 -1
- package/_cjs/Fiber/definition.cjs +6 -4
- package/_cjs/Fiber/definition.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScoped.cjs +1 -2
- package/_cjs/FiberRef/api/locallyScoped.cjs.map +1 -1
- package/_cjs/FiberRef/api/locallyScopedWith.cjs +1 -2
- package/_cjs/FiberRef/api/locallyScopedWith.cjs.map +1 -1
- package/_cjs/FiberRef/constructors.cjs +1 -2
- package/_cjs/FiberRef/constructors.cjs.map +1 -1
- package/_cjs/FiberRef/definition.cjs +1 -2
- package/_cjs/FiberRef/definition.cjs.map +1 -1
- package/_cjs/FiberRef/operations.cjs +1 -2
- package/_cjs/FiberRef/operations.cjs.map +1 -1
- package/_cjs/FiberRef/unsafe.cjs +1 -2
- package/_cjs/FiberRef/unsafe.cjs.map +1 -1
- package/_cjs/FiberRefs/Patch.cjs +1 -2
- package/_cjs/FiberRefs/Patch.cjs.map +1 -1
- package/_cjs/FiberRefs/api.cjs +1 -2
- package/_cjs/FiberRefs/api.cjs.map +1 -1
- package/_cjs/FiberRefs/definition.cjs +1 -2
- package/_cjs/FiberRefs/definition.cjs.map +1 -1
- package/_cjs/FiberScope/definition.cjs +29 -6
- package/_cjs/FiberScope/definition.cjs.map +1 -1
- package/_cjs/FiberSet.cjs +16 -15
- package/_cjs/FiberSet.cjs.map +1 -1
- package/_cjs/FiberStatus/definition.cjs +1 -2
- package/_cjs/FiberStatus/definition.cjs.map +1 -1
- package/_cjs/Future/State.cjs +108 -0
- package/_cjs/Future/State.cjs.map +1 -0
- package/_cjs/Future/api.cjs +71 -64
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Future/constructors.cjs +3 -4
- package/_cjs/Future/constructors.cjs.map +1 -1
- package/_cjs/Future/definition.cjs +1 -15
- package/_cjs/Future/definition.cjs.map +1 -1
- package/_cjs/Future.cjs +11 -0
- package/_cjs/Future.cjs.map +1 -1
- package/_cjs/Hub/api.cjs +56 -57
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +1 -2
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/acquireRelease.cjs +1 -2
- package/_cjs/IO/api/acquireRelease.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseExit.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseExit.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptible.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseInterruptible.cjs.map +1 -1
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs +1 -2
- package/_cjs/IO/api/acquireReleaseInterruptibleExit.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizer.cjs +1 -2
- package/_cjs/IO/api/addFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/addFinalizerExit.cjs +1 -2
- package/_cjs/IO/api/addFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/all.cjs +1 -2
- package/_cjs/IO/api/all.cjs.map +1 -1
- package/_cjs/IO/api/array.cjs +51 -0
- package/_cjs/IO/api/array.cjs.map +1 -0
- package/_cjs/IO/api/asyncIO.cjs +1 -2
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/asyncInterrupt.cjs +1 -2
- package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
- package/_cjs/IO/api/awaitAllChildren.cjs +17 -0
- package/_cjs/IO/api/awaitAllChildren.cjs.map +1 -0
- package/_cjs/IO/api/blocking.cjs +1 -2
- package/_cjs/IO/api/blocking.cjs.map +1 -1
- package/_cjs/IO/api/bracket.cjs +1 -2
- package/_cjs/IO/api/bracket.cjs.map +1 -1
- package/_cjs/IO/api/bracketExit.cjs +1 -2
- package/_cjs/IO/api/bracketExit.cjs.map +1 -1
- package/_cjs/IO/api/cachedInvalidate.cjs +47 -0
- package/_cjs/IO/api/cachedInvalidate.cjs.map +1 -0
- package/_cjs/IO/api/clockWith.cjs +1 -2
- package/_cjs/IO/api/clockWith.cjs.map +1 -1
- package/_cjs/IO/api/concurrency.cjs +1 -2
- package/_cjs/IO/api/concurrency.cjs.map +1 -1
- package/_cjs/IO/api/concurrentFinalizers.cjs +1 -2
- package/_cjs/IO/api/concurrentFinalizers.cjs.map +1 -1
- package/_cjs/IO/api/consoleWith.cjs +1 -2
- package/_cjs/IO/api/consoleWith.cjs.map +1 -1
- package/_cjs/IO/api/daemonChildren.cjs +1 -2
- package/_cjs/IO/api/daemonChildren.cjs.map +1 -1
- package/_cjs/IO/api/delay.cjs +1 -2
- package/_cjs/IO/api/delay.cjs.map +1 -1
- package/_cjs/IO/api/descriptor.cjs +1 -2
- package/_cjs/IO/api/descriptor.cjs.map +1 -1
- package/_cjs/IO/api/diffFiberRefs.cjs +1 -2
- package/_cjs/IO/api/diffFiberRefs.cjs.map +1 -1
- package/_cjs/IO/api/disconnect.cjs +2 -3
- package/_cjs/IO/api/disconnect.cjs.map +1 -1
- package/_cjs/IO/api/ensuringChildren.cjs +1 -2
- package/_cjs/IO/api/ensuringChildren.cjs.map +1 -1
- package/_cjs/IO/api/environment.cjs +1 -2
- package/_cjs/IO/api/environment.cjs.map +1 -1
- package/_cjs/IO/api/foreachConcurrent.cjs +36 -30
- package/_cjs/IO/api/foreachConcurrent.cjs.map +1 -1
- package/_cjs/IO/api/foreachExec.cjs +1 -2
- package/_cjs/IO/api/foreachExec.cjs.map +1 -1
- package/_cjs/IO/api/fork.cjs +2 -3
- package/_cjs/IO/api/fork.cjs.map +1 -1
- package/_cjs/IO/api/forkAll.cjs +1 -2
- package/_cjs/IO/api/forkAll.cjs.map +1 -1
- package/_cjs/IO/api/forkDaemon.cjs +5 -6
- package/_cjs/IO/api/forkDaemon.cjs.map +1 -1
- package/_cjs/IO/api/forkIn.cjs +1 -2
- package/_cjs/IO/api/forkIn.cjs.map +1 -1
- package/_cjs/IO/api/forkScoped.cjs +1 -2
- package/_cjs/IO/api/forkScoped.cjs.map +1 -1
- package/_cjs/IO/api/fulfill.cjs +1 -2
- package/_cjs/IO/api/fulfill.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +4 -5
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/memoize.cjs +1 -2
- package/_cjs/IO/api/memoize.cjs.map +1 -1
- package/_cjs/IO/api/onTermination.cjs +2 -3
- package/_cjs/IO/api/onTermination.cjs.map +1 -1
- package/_cjs/IO/api/once.cjs +1 -2
- package/_cjs/IO/api/once.cjs.map +1 -1
- package/_cjs/IO/api/patchFiberRefs.cjs +1 -2
- package/_cjs/IO/api/patchFiberRefs.cjs.map +1 -1
- package/_cjs/IO/api/provideLayer.cjs +1 -2
- package/_cjs/IO/api/provideLayer.cjs.map +1 -1
- package/_cjs/IO/api/provideScope.cjs +1 -2
- package/_cjs/IO/api/provideScope.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeLayer.cjs +1 -2
- package/_cjs/IO/api/provideSomeLayer.cjs.map +1 -1
- package/_cjs/IO/api/provideSomeRuntime.cjs +1 -2
- package/_cjs/IO/api/provideSomeRuntime.cjs.map +1 -1
- package/_cjs/IO/api/race.cjs +2 -3
- package/_cjs/IO/api/race.cjs.map +1 -1
- package/_cjs/IO/api/raceFirst.cjs +1 -2
- package/_cjs/IO/api/raceFirst.cjs.map +1 -1
- package/_cjs/IO/api/raceWith.cjs +1 -2
- package/_cjs/IO/api/raceWith.cjs.map +1 -1
- package/_cjs/IO/api/randomWith.cjs +1 -2
- package/_cjs/IO/api/randomWith.cjs.map +1 -1
- package/_cjs/IO/api/repeat.cjs +1 -2
- package/_cjs/IO/api/repeat.cjs.map +1 -1
- package/_cjs/IO/api/retry.cjs +1 -2
- package/_cjs/IO/api/retry.cjs.map +1 -1
- package/_cjs/IO/api/schedule.cjs +1 -2
- package/_cjs/IO/api/schedule.cjs.map +1 -1
- package/_cjs/IO/api/scope.cjs +1 -2
- package/_cjs/IO/api/scope.cjs.map +1 -1
- package/_cjs/IO/api/scopeWith.cjs +1 -2
- package/_cjs/IO/api/scopeWith.cjs.map +1 -1
- package/_cjs/IO/api/scoped.cjs +1 -2
- package/_cjs/IO/api/scoped.cjs.map +1 -1
- package/_cjs/IO/api/sleep.cjs +1 -2
- package/_cjs/IO/api/sleep.cjs.map +1 -1
- package/_cjs/IO/api/stateful.cjs +1 -2
- package/_cjs/IO/api/stateful.cjs.map +1 -1
- package/_cjs/IO/api/supervised.cjs +1 -2
- package/_cjs/IO/api/supervised.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +9 -11
- package/_cjs/IO/api/timeout.cjs.map +1 -1
- package/_cjs/IO/api/transplant.cjs +22 -7
- package/_cjs/IO/api/transplant.cjs.map +1 -1
- package/_cjs/IO/api/whenFiberRef.cjs +1 -2
- package/_cjs/IO/api/whenFiberRef.cjs.map +1 -1
- package/_cjs/IO/api/whenRef.cjs +1 -2
- package/_cjs/IO/api/whenRef.cjs.map +1 -1
- package/_cjs/IO/api/withChildren.cjs +1 -2
- package/_cjs/IO/api/withChildren.cjs.map +1 -1
- package/_cjs/IO/api/withEarlyRelease.cjs +1 -2
- package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizer.cjs +1 -2
- package/_cjs/IO/api/withFinalizer.cjs.map +1 -1
- package/_cjs/IO/api/withFinalizerExit.cjs +1 -2
- package/_cjs/IO/api/withFinalizerExit.cjs.map +1 -1
- package/_cjs/IO/api/zipConcurrent.cjs +5 -6
- package/_cjs/IO/api/zipConcurrent.cjs.map +1 -1
- package/_cjs/IO/api.cjs +522 -473
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +2 -3
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +9 -10
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/IO.cjs +33 -11
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/IOEnv/definition.cjs +1 -2
- package/_cjs/IOEnv/definition.cjs.map +1 -1
- package/_cjs/IOEnv/live.cjs +1 -2
- package/_cjs/IOEnv/live.cjs.map +1 -1
- package/_cjs/IOEnv/services.cjs +1 -2
- package/_cjs/IOEnv/services.cjs.map +1 -1
- package/_cjs/Layer/MemoMap.cjs +1 -2
- package/_cjs/Layer/MemoMap.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +1 -2
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Logger/api.cjs +1 -2
- package/_cjs/Logger/api.cjs.map +1 -1
- package/_cjs/Logger/constructors.cjs +1 -2
- package/_cjs/Logger/constructors.cjs.map +1 -1
- package/_cjs/MVar/api.cjs +1 -2
- package/_cjs/MVar/api.cjs.map +1 -1
- package/_cjs/Push/api.cjs +2 -3
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Push/internal.cjs +1 -2
- package/_cjs/Push/internal.cjs.map +1 -1
- package/_cjs/Queue/api/dimapIO.cjs +1 -2
- package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +1 -2
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +1 -2
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Queue/api/poll.cjs +1 -2
- package/_cjs/Queue/api/poll.cjs.map +1 -1
- package/_cjs/Queue/api/takeBetween.cjs +1 -2
- package/_cjs/Queue/api/takeBetween.cjs.map +1 -1
- package/_cjs/Queue/api/takeN.cjs +1 -2
- package/_cjs/Queue/api/takeN.cjs.map +1 -1
- package/_cjs/Queue/api/zipWithIO.cjs +1 -2
- package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
- package/_cjs/Queue/constructors.cjs +1 -2
- package/_cjs/Queue/constructors.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +1 -2
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Queue/strategy.cjs +1 -2
- package/_cjs/Queue/strategy.cjs.map +1 -1
- package/_cjs/Random/api.cjs +1 -2
- package/_cjs/Random/api.cjs.map +1 -1
- package/_cjs/Random/definition.cjs +2 -2
- package/_cjs/Random/definition.cjs.map +1 -1
- package/_cjs/Random/live.cjs +1 -2
- package/_cjs/Random/live.cjs.map +1 -1
- package/_cjs/Ref/Atomic.cjs +1 -2
- package/_cjs/Ref/Atomic.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs +1 -2
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs +1 -2
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/api.cjs +2 -3
- package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/constructors.cjs +2 -3
- package/_cjs/Ref/Synchronized/constructors.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/definition.cjs +2 -3
- package/_cjs/Ref/Synchronized/definition.cjs.map +1 -1
- package/_cjs/Ref/api/collect.cjs +1 -2
- package/_cjs/Ref/api/collect.cjs.map +1 -1
- package/_cjs/Ref/api/dimap.cjs +1 -2
- package/_cjs/Ref/api/dimap.cjs.map +1 -1
- package/_cjs/Ref/api/filter.cjs +1 -2
- package/_cjs/Ref/api/filter.cjs.map +1 -1
- package/_cjs/Ref/api/modify.cjs +1 -2
- package/_cjs/Ref/api/modify.cjs.map +1 -1
- package/_cjs/Ref/api.cjs +1 -2
- package/_cjs/Ref/api.cjs.map +1 -1
- package/_cjs/Ref/constructors.cjs +1 -2
- package/_cjs/Ref/constructors.cjs.map +1 -1
- package/_cjs/RefSubject/Atomic.cjs +1 -2
- package/_cjs/RefSubject/Atomic.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/api.cjs +1 -2
- package/_cjs/RefSubject/Synchronized/api.cjs.map +1 -1
- package/_cjs/RefSubject/Synchronized/definition.cjs +1 -2
- package/_cjs/RefSubject/Synchronized/definition.cjs.map +1 -1
- package/_cjs/RefSubject/api.cjs +1 -2
- package/_cjs/RefSubject/api.cjs.map +1 -1
- package/_cjs/Reloadable/api.cjs +1 -2
- package/_cjs/Reloadable/api.cjs.map +1 -1
- package/_cjs/Reloadable/constructors.cjs +1 -2
- package/_cjs/Reloadable/constructors.cjs.map +1 -1
- package/_cjs/Reloadable/definition.cjs +1 -2
- package/_cjs/Reloadable/definition.cjs.map +1 -1
- package/_cjs/RuntimeFlags/Patch.cjs +1 -2
- package/_cjs/RuntimeFlags/Patch.cjs.map +1 -1
- package/_cjs/RuntimeFlags/RuntimeFlags.cjs +1 -2
- package/_cjs/RuntimeFlags/RuntimeFlags.cjs.map +1 -1
- package/_cjs/STM/api/atomically.cjs +1 -2
- package/_cjs/STM/api/atomically.cjs.map +1 -1
- package/_cjs/STM/api/core-api.cjs +1 -2
- package/_cjs/STM/api/core-api.cjs.map +1 -1
- package/_cjs/STM/api.cjs +1 -2
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs +2 -3
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/driver.cjs +1 -2
- package/_cjs/STM/driver.cjs.map +1 -1
- package/_cjs/STM/internal/CommitState.cjs +1 -2
- package/_cjs/STM/internal/CommitState.cjs.map +1 -1
- package/_cjs/STM/internal/Journal.cjs +1 -2
- package/_cjs/STM/internal/Journal.cjs.map +1 -1
- package/_cjs/Schedule/Decision.cjs +1 -2
- package/_cjs/Schedule/Decision.cjs.map +1 -1
- package/_cjs/Schedule/api/driver.cjs +1 -2
- package/_cjs/Schedule/api/driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +1 -2
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Scope/Finalizer/definition.cjs +1 -2
- package/_cjs/Scope/Finalizer/definition.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/constructors.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/constructors.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/definition.cjs +1 -2
- package/_cjs/Scope/ReleaseMap/definition.cjs.map +1 -1
- package/_cjs/Scope/api.cjs +1 -2
- package/_cjs/Scope/api.cjs.map +1 -1
- package/_cjs/Scope/definition.cjs +1 -2
- package/_cjs/Scope/definition.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +2 -3
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/Semaphore/Reservation.cjs +24 -0
- package/_cjs/Semaphore/Reservation.cjs.map +1 -0
- package/_cjs/Semaphore/constructors.cjs +25 -0
- package/_cjs/Semaphore/constructors.cjs.map +1 -0
- package/_cjs/Semaphore/definition.cjs +149 -0
- package/_cjs/Semaphore/definition.cjs.map +1 -0
- package/_cjs/Semaphore.cjs +31 -138
- package/_cjs/Semaphore.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +1 -2
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/State/api.cjs +1 -2
- package/_cjs/State/api.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +1 -2
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWith.cjs +1 -2
- package/_cjs/Stream/api/zipWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +1 -2
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +702 -703
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +1 -2
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/Pull.cjs +1 -2
- package/_cjs/Stream/internal/Pull.cjs.map +1 -1
- package/_cjs/Stream/internal/Take.cjs +1 -2
- package/_cjs/Stream/internal/Take.cjs.map +1 -1
- package/_cjs/Stream/internal/util.cjs +1 -2
- package/_cjs/Stream/internal/util.cjs.map +1 -1
- package/_cjs/Subject/Atomic.cjs +1 -2
- package/_cjs/Subject/Atomic.cjs.map +1 -1
- package/_cjs/Subject/api.cjs +1 -2
- package/_cjs/Subject/api.cjs.map +1 -1
- package/_cjs/SubscriptionRef.cjs +2 -3
- package/_cjs/SubscriptionRef.cjs.map +1 -1
- package/_cjs/Supervisor/api.cjs +1 -2
- package/_cjs/Supervisor/api.cjs.map +1 -1
- package/_cjs/Supervisor/constructors.cjs +1 -2
- package/_cjs/Supervisor/constructors.cjs.map +1 -1
- package/_cjs/Supervisor/definition.cjs +1 -2
- package/_cjs/Supervisor/definition.cjs.map +1 -1
- package/_cjs/SupervisorPatch.cjs +1 -2
- package/_cjs/SupervisorPatch.cjs.map +1 -1
- package/_cjs/TExit/definition.cjs +1 -2
- package/_cjs/TExit/definition.cjs.map +1 -1
- package/_cjs/TFuture/api.cjs +1 -2
- package/_cjs/TFuture/api.cjs.map +1 -1
- package/_cjs/TFuture/constructors.cjs +1 -2
- package/_cjs/TFuture/constructors.cjs.map +1 -1
- package/_cjs/TFuture/definition.cjs +1 -2
- package/_cjs/TFuture/definition.cjs.map +1 -1
- package/_cjs/TReentrantLock/api.cjs +1 -2
- package/_cjs/TReentrantLock/api.cjs.map +1 -1
- package/_cjs/TReentrantLock/definition.cjs +1 -2
- package/_cjs/TReentrantLock/definition.cjs.map +1 -1
- package/_cjs/TRef/api.cjs +1 -2
- package/_cjs/TRef/api.cjs.map +1 -1
- package/_cjs/TRef/constructors.cjs +1 -2
- package/_cjs/TRef/constructors.cjs.map +1 -1
- package/_cjs/TRef/definition.cjs +1 -2
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/TSemaphore/api.cjs +1 -2
- package/_cjs/TSemaphore/api.cjs.map +1 -1
- package/_cjs/TSemaphore/constructors.cjs +1 -2
- package/_cjs/TSemaphore/constructors.cjs.map +1 -1
- package/_cjs/TSemaphore/definition.cjs +1 -2
- package/_cjs/TSemaphore/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/dropUntilIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/dropWhileIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/filterIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/filterIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/findIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/mapIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/mapIO.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs +1 -2
- package/_cjs/collection/immutable/Conc/takeWhileIO.cjs.map +1 -1
- package/_cjs/data/Exit/foreachIO.cjs +1 -2
- package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
- package/_cjs/internal/HashedPair.cjs +1 -2
- package/_cjs/internal/HashedPair.cjs.map +1 -1
- package/_cjs/internal/Hub.cjs +1 -2
- package/_cjs/internal/Hub.cjs.map +1 -1
- package/_cjs/internal/MutableQueue.cjs +1 -2
- package/_cjs/internal/MutableQueue.cjs.map +1 -1
- package/_cjs/internal/Scheduler.cjs +1 -2
- package/_cjs/internal/Scheduler.cjs.map +1 -1
- package/_cjs/internal/StackTraceBuilder.cjs +1 -2
- package/_cjs/internal/StackTraceBuilder.cjs.map +1 -1
- package/_mjs/Cached/api.mjs.map +1 -1
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +1 -1
- package/_mjs/Channel/api/runScoped.mjs +2 -2
- package/_mjs/Channel/api/runScoped.mjs.map +1 -1
- package/_mjs/Channel/api/toPull.mjs +1 -1
- package/_mjs/Channel/api/toPull.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +205 -205
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/core-api.mjs +43 -42
- package/_mjs/Channel/core-api.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +3 -3
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Console/definition.mjs +1 -0
- package/_mjs/Console/definition.mjs.map +1 -1
- package/_mjs/CountdownLatch.mjs +2 -1
- package/_mjs/CountdownLatch.mjs.map +1 -1
- package/_mjs/Fiber/FiberMessage.mjs +2 -20
- package/_mjs/Fiber/FiberMessage.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +877 -633
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/Fiber/api/collectAll.mjs +1 -1
- package/_mjs/Fiber/api/collectAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interrupt.mjs +1 -1
- package/_mjs/Fiber/api/interrupt.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs +1 -1
- package/_mjs/Fiber/api/interruptAll.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptAs.mjs +4 -7
- package/_mjs/Fiber/api/interruptAs.mjs.map +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs +1 -1
- package/_mjs/Fiber/api/interruptFork.mjs.map +1 -1
- package/_mjs/Fiber/api/mapIO.mjs +1 -1
- package/_mjs/Fiber/api/mapIO.mjs.map +1 -1
- package/_mjs/Fiber/api/zipWith.mjs +1 -1
- package/_mjs/Fiber/api/zipWith.mjs.map +1 -1
- package/_mjs/Fiber/constructors.mjs +1 -1
- package/_mjs/Fiber/constructors.mjs.map +1 -1
- package/_mjs/Fiber/definition.mjs +5 -2
- package/_mjs/Fiber/definition.mjs.map +1 -1
- package/_mjs/FiberScope/definition.mjs +28 -4
- package/_mjs/FiberScope/definition.mjs.map +1 -1
- package/_mjs/FiberSet.mjs +14 -12
- package/_mjs/FiberSet.mjs.map +1 -1
- package/_mjs/Future/State.mjs +96 -0
- package/_mjs/Future/State.mjs.map +1 -0
- package/_mjs/Future/api.mjs +67 -61
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Future/constructors.mjs +3 -3
- package/_mjs/Future/constructors.mjs.map +1 -1
- package/_mjs/Future/definition.mjs +0 -12
- package/_mjs/Future/definition.mjs.map +1 -1
- package/_mjs/Future.mjs +1 -0
- package/_mjs/Future.mjs.map +1 -1
- package/_mjs/Hub/api.mjs +55 -55
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/IO/api/array.mjs +42 -0
- package/_mjs/IO/api/array.mjs.map +1 -0
- package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
- package/_mjs/IO/api/awaitAllChildren.mjs +10 -0
- package/_mjs/IO/api/awaitAllChildren.mjs.map +1 -0
- package/_mjs/IO/api/cachedInvalidate.mjs +39 -0
- package/_mjs/IO/api/cachedInvalidate.mjs.map +1 -0
- package/_mjs/IO/api/disconnect.mjs +1 -1
- package/_mjs/IO/api/disconnect.mjs.map +1 -1
- package/_mjs/IO/api/foreachConcurrent.mjs +35 -28
- package/_mjs/IO/api/foreachConcurrent.mjs.map +1 -1
- package/_mjs/IO/api/fork.mjs +1 -1
- package/_mjs/IO/api/fork.mjs.map +1 -1
- package/_mjs/IO/api/forkDaemon.mjs +4 -4
- package/_mjs/IO/api/forkDaemon.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +3 -3
- package/_mjs/IO/api/onTermination.mjs +1 -1
- package/_mjs/IO/api/onTermination.mjs.map +1 -1
- package/_mjs/IO/api/race.mjs +1 -1
- package/_mjs/IO/api/race.mjs.map +1 -1
- package/_mjs/IO/api/timeout.mjs +8 -9
- package/_mjs/IO/api/timeout.mjs.map +1 -1
- package/_mjs/IO/api/transplant.mjs +19 -5
- package/_mjs/IO/api/transplant.mjs.map +1 -1
- package/_mjs/IO/api/zipConcurrent.mjs +4 -4
- package/_mjs/IO/api/zipConcurrent.mjs.map +1 -1
- package/_mjs/IO/api.mjs +515 -468
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +1 -1
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +8 -8
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/IO.mjs +3 -1
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/IOEnv/definition.mjs.map +1 -1
- package/_mjs/Push/api.mjs +1 -1
- package/_mjs/Random/definition.mjs +1 -0
- package/_mjs/Random/definition.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/api.mjs +1 -1
- package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/constructors.mjs +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs +1 -1
- package/_mjs/Ref/Synchronized/definition.mjs.map +1 -1
- package/_mjs/STM/definition.mjs +1 -1
- package/_mjs/ScopedRef/api.mjs +1 -1
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/Semaphore/Reservation.mjs +16 -0
- package/_mjs/Semaphore/Reservation.mjs.map +1 -0
- package/_mjs/Semaphore/constructors.mjs +17 -0
- package/_mjs/Semaphore/constructors.mjs.map +1 -0
- package/_mjs/Semaphore/definition.mjs +141 -0
- package/_mjs/Semaphore/definition.mjs.map +1 -0
- package/_mjs/Semaphore.mjs +4 -133
- package/_mjs/Semaphore.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +701 -701
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/SubscriptionRef.mjs +1 -1
- package/_src/Cached/api.ts +3 -3
- package/_src/Channel/api/toPull.ts +1 -1
- package/_src/Channel/api.ts +273 -272
- package/_src/Channel/core-api.ts +57 -55
- package/_src/Channel/internal/ChannelExecutor.ts +3 -3
- package/_src/Console/definition.ts +1 -0
- package/_src/CountdownLatch.ts +2 -0
- package/_src/Fiber/FiberMessage.ts +3 -28
- package/_src/Fiber/FiberRuntime.ts +988 -616
- package/_src/Fiber/api/interruptAs.ts +4 -3
- package/_src/Fiber/constructors.ts +1 -1
- package/_src/Fiber/definition.ts +4 -0
- package/_src/FiberScope/definition.ts +40 -2
- package/_src/FiberSet.ts +6 -2
- package/_src/Future/State.ts +128 -0
- package/_src/Future/api.ts +62 -51
- package/_src/Future/constructors.ts +4 -2
- package/_src/Future/definition.ts +2 -17
- package/_src/Future.ts +4 -3
- package/_src/Hub/api.ts +61 -61
- package/_src/IO/api/addFinalizerExit.ts +4 -4
- package/_src/IO/api/array.ts +49 -0
- package/_src/IO/api/asyncInterrupt.ts +1 -1
- package/_src/IO/api/awaitAllChildren.ts +6 -0
- package/_src/IO/api/cachedInvalidate.ts +42 -0
- package/_src/IO/api/foreachConcurrent.ts +39 -23
- package/_src/IO/api/fork.ts +1 -1
- package/_src/IO/api/forkDaemon.ts +2 -2
- package/_src/IO/api/memoize.ts +3 -3
- package/_src/IO/api/onTermination.ts +2 -2
- package/_src/IO/api/transplant.ts +26 -3
- package/_src/IO/api/zipConcurrent.ts +2 -2
- package/_src/IO/api.ts +547 -525
- package/_src/IO/definition.ts +4 -28
- package/_src/IO/runtime.ts +0 -1
- package/_src/IO.ts +65 -63
- package/_src/IOEnv/definition.ts +1 -4
- package/_src/Random/definition.ts +1 -0
- package/_src/Ref/Synchronized/api.ts +2 -2
- package/_src/Ref/Synchronized/definition.ts +1 -1
- package/_src/Semaphore/Reservation.ts +15 -0
- package/_src/Semaphore/constructors.ts +14 -0
- package/_src/Semaphore/definition.ts +180 -0
- package/_src/Semaphore.ts +5 -159
- package/_src/Stream/api.ts +679 -679
- package/package.json +4 -4
- package/IO/api/sequenceT.d.ts +0 -26
- package/_cjs/IO/api/sequenceT.cjs +0 -18
- package/_cjs/IO/api/sequenceT.cjs.map +0 -1
- package/_mjs/IO/api/sequenceT.mjs +0 -10
- package/_mjs/IO/api/sequenceT.mjs.map +0 -1
- package/_src/IO/api/sequenceT.ts +0 -16
package/_cjs/Channel/api.cjs
CHANGED
@@ -57,13 +57,13 @@ exports.unwrapScoped = unwrapScoped;
|
|
57
57
|
exports.write = void 0;
|
58
58
|
exports.writeAll = writeAll;
|
59
59
|
exports.writeNow = exports.writeChunk = void 0;
|
60
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/
|
61
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api
|
62
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Ref/api/
|
63
|
-
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api"));
|
64
|
-
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/
|
65
|
-
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/
|
66
|
-
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/
|
60
|
+
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Ref/api/get"));
|
61
|
+
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api"));
|
62
|
+
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Ref/api/set"));
|
63
|
+
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api/interrupt"));
|
64
|
+
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Channel/core-api"));
|
65
|
+
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Ref/constructors"));
|
66
|
+
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api/environment"));
|
67
67
|
var tsplus_module_8 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Ref/api/modify"));
|
68
68
|
var tsplus_module_9 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Conc/api/empty"));
|
69
69
|
var tsplus_module_10 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Conc/api"));
|
@@ -76,28 +76,27 @@ var tsplus_module_16 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require
|
|
76
76
|
var tsplus_module_17 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Maybe/destructors"));
|
77
77
|
var tsplus_module_18 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Exit/api"));
|
78
78
|
var tsplus_module_19 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Queue/api/operations"));
|
79
|
-
var tsplus_module_20 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/
|
80
|
-
var tsplus_module_21 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/
|
81
|
-
var tsplus_module_22 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/
|
82
|
-
var tsplus_module_23 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/
|
79
|
+
var tsplus_module_20 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/util/predicates"));
|
80
|
+
var tsplus_module_21 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Exit/constructors"));
|
81
|
+
var tsplus_module_22 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Scope/api"));
|
82
|
+
var tsplus_module_23 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/IO/api/asyncInterrupt"));
|
83
83
|
var tsplus_module_24 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/data/Either/constructors"));
|
84
84
|
var tsplus_module_25 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/base/collection/immutable/Conc/constructors"));
|
85
85
|
var tsplus_module_26 = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("@fncts/io/Hub/api"));
|
86
86
|
var _function = /*#__PURE__*/require("@fncts/base/data/function");
|
87
87
|
var _definition3 = /*#__PURE__*/require("@fncts/io/Channel/definition");
|
88
|
-
function
|
89
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
88
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
90
89
|
var _a;
|
91
90
|
const fileName_1 = "(@fncts/io) src/Channel/api.ts";
|
92
|
-
const as_ = exports.as_ = as_1;
|
93
|
-
const ask = exports.ask = ask_1;
|
94
91
|
const acquireReleaseExitWith = exports.acquireReleaseExitWith = acquireReleaseExitWith_1;
|
95
92
|
const acquireReleaseOutExitWith = exports.acquireReleaseOutExitWith = acquireReleaseOutExitWith_1;
|
93
|
+
const as_ = exports.as_ = as_1;
|
94
|
+
const ask = exports.ask = ask_1;
|
96
95
|
const buffer = exports.buffer = buffer_1;
|
97
96
|
const catchAll = exports.catchAll = catchAll_1;
|
98
97
|
const catchAllCause = exports.catchAllCause = catchAllCause_1;
|
99
|
-
const concatMapWith = exports.concatMapWith = concatMapWith_1;
|
100
98
|
const concatAllWith = exports.concatAllWith = concatAllWith_1;
|
99
|
+
const concatMapWith = exports.concatMapWith = concatMapWith_1;
|
101
100
|
const defer = exports.defer = defer_1;
|
102
101
|
const doneCollect = exports.doneCollect = doneCollect_1;
|
103
102
|
const ensuringWith = exports.ensuringWith = ensuringWith_1;
|
@@ -106,18 +105,18 @@ const flatten = exports.flatten = flatten_1;
|
|
106
105
|
const fromInput = exports.fromInput = fromInput_1;
|
107
106
|
const fromIO = exports.fromIO = fromIO_1;
|
108
107
|
const fromQueue = exports.fromQueue = fromQueue_1;
|
109
|
-
const provideEnvironment = exports.provideEnvironment = provideEnvironment_1;
|
110
108
|
const haltNow = exports.haltNow = haltNow_1;
|
111
109
|
const id = exports.id = id_1;
|
112
|
-
const scoped = exports.scoped = scoped_1;
|
113
110
|
const mapErrorCause = exports.mapErrorCause = mapErrorCause_1;
|
114
111
|
const mapIO = exports.mapIO = mapIO_1;
|
112
|
+
const provideEnvironment = exports.provideEnvironment = provideEnvironment_1;
|
113
|
+
const scoped = exports.scoped = scoped_1;
|
115
114
|
const matchCauseChannel = exports.matchCauseChannel = matchCauseChannel_1;
|
116
115
|
const orHaltWith = exports.orHaltWith = orHaltWith_1;
|
117
116
|
const pipeTo = exports.pipeTo = pipeTo_1;
|
118
117
|
const readOrFail = exports.readOrFail = readOrFail_1;
|
119
|
-
const readWithCause = exports.readWithCause = readWithCause_1;
|
120
118
|
const readWith = exports.readWith = readWith_1;
|
119
|
+
const readWithCause = exports.readWithCause = readWithCause_1;
|
121
120
|
const repeated = exports.repeated = repeated_1;
|
122
121
|
const toQueue = exports.toQueue = toQueue_1;
|
123
122
|
const write = exports.write = write_1;
|
@@ -125,29 +124,29 @@ const writeChunk = exports.writeChunk = writeChunk_1;
|
|
125
124
|
const writeNow = exports.writeNow = writeNow_1;
|
126
125
|
const unwrap = exports.unwrap = unwrap_1;
|
127
126
|
/**
|
128
|
-
*
|
129
|
-
* is the specified constant value.
|
130
|
-
*
|
131
|
-
* This method produces the same result as mapping this channel to the specified constant value.
|
132
|
-
*
|
133
|
-
* @tsplus pipeable fncts.io.Channel as
|
127
|
+
* @tsplus static fncts.io.ChannelOps acquireReleaseExitWith
|
134
128
|
*/
|
135
|
-
function
|
136
|
-
return
|
137
|
-
return tsplus_module_1.map(() => z2())(self);
|
138
|
-
};
|
129
|
+
function acquireReleaseExitWith_1(acquire, use, release) {
|
130
|
+
return tsplus_module_5.flatMap(ref => ensuringWith_1(exit => tsplus_module_2.flatMap(fin => fin(exit), fileName_1 + ":21:46")(tsplus_module_1.get(ref, fileName_1 + ":21:34")))(tsplus_module_5.flatMap(use)(fromIO_1(() => tsplus_module_4.uninterruptible(tsplus_module_2.tap(a => tsplus_module_3.set(exit => release(a, exit), fileName_1 + ":19:46")(ref), fileName_1 + ":19:31")(acquire), fileName_1 + ":19:75")))))(fromIO_1(() => tsplus_module_6.make(() => _ => tsplus_module_2.unit, fileName_1 + ":18:33")));
|
139
131
|
}
|
140
132
|
/**
|
141
|
-
*
|
133
|
+
* Construct a resource Channel with Acquire / Release
|
134
|
+
*
|
135
|
+
* @tsplus static fncts.io.ChannelOps acquireReleaseOutExitWith
|
142
136
|
*/
|
143
|
-
function
|
144
|
-
|
137
|
+
function acquireReleaseOutExitWith_1(self, release) {
|
138
|
+
const op = new _definition3.ChannelPrimitive(13 /* ChannelTag.BracketOut */);
|
139
|
+
op.i0 = self;
|
140
|
+
op.i1 = release;
|
141
|
+
return op;
|
145
142
|
}
|
146
143
|
/**
|
147
|
-
*
|
144
|
+
* Construct a resource Channel with Acquire / Release
|
145
|
+
*
|
146
|
+
* @tsplus static fncts.io.ChannelOps acquireReleaseOutWith
|
148
147
|
*/
|
149
|
-
function
|
150
|
-
return
|
148
|
+
function acquireReleaseOutWith(acquire, release) {
|
149
|
+
return acquireReleaseOutExitWith_1(acquire, (z, _) => release(z));
|
151
150
|
}
|
152
151
|
/**
|
153
152
|
* @tsplus static fncts.io.ChannelOps acquireReleaseWith
|
@@ -156,29 +155,29 @@ function acquireReleaseWith(acquire, use, release) {
|
|
156
155
|
return acquireReleaseExitWith_1(acquire, use, (a, _) => release(a));
|
157
156
|
}
|
158
157
|
/**
|
159
|
-
*
|
158
|
+
* Returns a new channel that is the same as this one, except the terminal value of the channel
|
159
|
+
* is the specified constant value.
|
160
|
+
*
|
161
|
+
* This method produces the same result as mapping this channel to the specified constant value.
|
162
|
+
*
|
163
|
+
* @tsplus pipeable fncts.io.Channel as
|
160
164
|
*/
|
161
|
-
function
|
162
|
-
return
|
165
|
+
function as_1(z2) {
|
166
|
+
return self => {
|
167
|
+
return tsplus_module_5.map(() => z2())(self);
|
168
|
+
};
|
163
169
|
}
|
164
170
|
/**
|
165
|
-
*
|
166
|
-
*
|
167
|
-
* @tsplus static fncts.io.ChannelOps acquireReleaseOutWith
|
171
|
+
* @tsplus static fncts.io.ChannelOps ask
|
168
172
|
*/
|
169
|
-
function
|
170
|
-
return
|
173
|
+
function ask_1() {
|
174
|
+
return fromIO_1(() => tsplus_module_7.environment(fileName_1 + ":83:39"));
|
171
175
|
}
|
172
176
|
/**
|
173
|
-
*
|
174
|
-
*
|
175
|
-
* @tsplus static fncts.io.ChannelOps acquireReleaseOutExitWith
|
177
|
+
* @tsplus getter fncts.io.Channel asUnit
|
176
178
|
*/
|
177
|
-
function
|
178
|
-
|
179
|
-
op.i0 = self;
|
180
|
-
op.i1 = release;
|
181
|
-
return op;
|
179
|
+
function asUnit(self) {
|
180
|
+
return as_1(() => undefined)(self);
|
182
181
|
}
|
183
182
|
/**
|
184
183
|
* Creates a channel backed by a buffer. When the buffer is empty, the channel will simply
|
@@ -190,9 +189,9 @@ function acquireReleaseOutExitWith_1(self, release) {
|
|
190
189
|
function buffer_1(empty, isEmpty, ref) {
|
191
190
|
return unwrap_1(() => tsplus_module_8.modify(v => {
|
192
191
|
if (isEmpty(v)) {
|
193
|
-
return (0, _function.tuple)(readWith_1(_in =>
|
192
|
+
return (0, _function.tuple)(readWith_1(_in => tsplus_module_5.zipRight(buffer_1(empty, isEmpty, ref))(writeNow_1(_in)), err => failNow_1(err), done => tsplus_module_5.endNow(done)), v);
|
194
193
|
} else {
|
195
|
-
return (0, _function.tuple)(
|
194
|
+
return (0, _function.tuple)(tsplus_module_5.zipRight(buffer_1(empty, isEmpty, ref))(writeNow_1(v)), empty);
|
196
195
|
}
|
197
196
|
}, fileName_1 + ":108:15")(ref));
|
198
197
|
}
|
@@ -211,7 +210,7 @@ function bufferChunk(ref) {
|
|
211
210
|
*/
|
212
211
|
function catchAll_1(f) {
|
213
212
|
return self => {
|
214
|
-
return catchAllCause_1(cause => tsplus_module_12.match(l => f(l), r =>
|
213
|
+
return catchAllCause_1(cause => tsplus_module_12.match(l => f(l), r => tsplus_module_5.failCauseNow(r))(tsplus_module_11.failureOrCause(cause)))(self);
|
215
214
|
};
|
216
215
|
}
|
217
216
|
/**
|
@@ -225,7 +224,7 @@ function catchAllCause_1(f) {
|
|
225
224
|
return self => {
|
226
225
|
const op = new _definition3.ChannelPrimitive(3 /* ChannelTag.Fold */);
|
227
226
|
const continuation = new _definition3.ChannelPrimitive(1 /* ChannelTag.ContinuationK */);
|
228
|
-
continuation.i0 =
|
227
|
+
continuation.i0 = tsplus_module_5.endNow;
|
229
228
|
continuation.i1 = f;
|
230
229
|
op.i0 = self;
|
231
230
|
op.i1 = continuation;
|
@@ -238,8 +237,8 @@ function catchAllCause_1(f) {
|
|
238
237
|
function collectElements(self) {
|
239
238
|
return defer_1(() => {
|
240
239
|
const builder = new tsplus_module_13.ConcBuilder(tsplus_module_9.empty());
|
241
|
-
const reader = readWith_1(out =>
|
242
|
-
return
|
240
|
+
const reader = readWith_1(out => tsplus_module_5.zipRight(reader)(tsplus_module_5.succeed(() => builder.append(out))), failNow_1, tsplus_module_5.succeedNow);
|
241
|
+
return tsplus_module_5.flatMap(z => tsplus_module_5.succeedNow([builder.result(), z]))(pipeTo_1(reader)(self));
|
243
242
|
});
|
244
243
|
}
|
245
244
|
/**
|
@@ -248,6 +247,35 @@ function collectElements(self) {
|
|
248
247
|
function concatAll(channels) {
|
249
248
|
return concatAllWith_1(() => void 0, () => void 0)(channels);
|
250
249
|
}
|
250
|
+
/**
|
251
|
+
* Concat sequentially a channel of channels
|
252
|
+
*
|
253
|
+
* @tsplus pipeable fncts.io.Channel concatAllWith
|
254
|
+
*/
|
255
|
+
function concatAllWith_1(f, g) {
|
256
|
+
return channels => {
|
257
|
+
const op = new _definition3.ChannelPrimitive(12 /* ChannelTag.ConcatAll */);
|
258
|
+
op.i0 = f;
|
259
|
+
op.i1 = g;
|
260
|
+
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":250:64"));
|
261
|
+
op.i3 = () => tsplus_module_16.Continue;
|
262
|
+
op.i4 = channels;
|
263
|
+
op.i5 = _function.identity;
|
264
|
+
return op;
|
265
|
+
};
|
266
|
+
}
|
267
|
+
/**
|
268
|
+
* Returns a new channel whose outputs are fed to the specified factory function, which creates
|
269
|
+
* new channels in response. These new channels are sequentially concatenated together, and all
|
270
|
+
* their outputs appear as outputs of the newly returned channel.
|
271
|
+
*
|
272
|
+
* @tsplus pipeable fncts.io.Channel concatMap
|
273
|
+
*/
|
274
|
+
function concatMap(f) {
|
275
|
+
return self => {
|
276
|
+
return concatMapWith_1(f, () => void 0, () => void 0)(self);
|
277
|
+
};
|
278
|
+
}
|
251
279
|
/**
|
252
280
|
* Returns a new channel whose outputs are fed to the specified factory function, which creates
|
253
281
|
* new channels in response. These new channels are sequentially concatenated together, and all
|
@@ -262,7 +290,7 @@ function concatMapWith_1(f, g, h) {
|
|
262
290
|
const op = new _definition3.ChannelPrimitive(12 /* ChannelTag.ConcatAll */);
|
263
291
|
op.i0 = g;
|
264
292
|
op.i1 = h;
|
265
|
-
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":
|
293
|
+
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":299:64"));
|
266
294
|
op.i3 = () => tsplus_module_16.Continue;
|
267
295
|
op.i4 = channel;
|
268
296
|
op.i5 = f;
|
@@ -291,48 +319,21 @@ function concatMapWithCustom(f, g, h, onPull, onEmit) {
|
|
291
319
|
};
|
292
320
|
}
|
293
321
|
/**
|
294
|
-
*
|
295
|
-
*
|
296
|
-
* @tsplus pipeable fncts.io.Channel concatAllWith
|
297
|
-
*/
|
298
|
-
function concatAllWith_1(f, g) {
|
299
|
-
return channels => {
|
300
|
-
const op = new _definition3.ChannelPrimitive(12 /* ChannelTag.ConcatAll */);
|
301
|
-
op.i0 = f;
|
302
|
-
op.i1 = g;
|
303
|
-
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":319:64"));
|
304
|
-
op.i3 = () => tsplus_module_16.Continue;
|
305
|
-
op.i4 = channels;
|
306
|
-
op.i5 = _function.identity;
|
307
|
-
return op;
|
308
|
-
};
|
309
|
-
}
|
310
|
-
/**
|
311
|
-
* Returns a new channel whose outputs are fed to the specified factory function, which creates
|
312
|
-
* new channels in response. These new channels are sequentially concatenated together, and all
|
313
|
-
* their outputs appear as outputs of the newly returned channel.
|
314
|
-
*
|
315
|
-
* @tsplus pipeable fncts.io.Channel concatMap
|
322
|
+
* @tsplus pipeable fncts.io.Channel contramap
|
316
323
|
*/
|
317
|
-
function
|
324
|
+
function contramap(f) {
|
318
325
|
return self => {
|
319
|
-
return
|
326
|
+
return pipeTo_1(self)(contramapReader(f));
|
320
327
|
};
|
321
328
|
}
|
322
|
-
function contramapReader(f) {
|
323
|
-
return readWith_1(_in => tsplus_module_1.zipRight(contramapReader(f))(writeNow_1(_in)), failNow_1, done => tsplus_module_1.endNow(f(done)));
|
324
|
-
}
|
325
329
|
/**
|
326
|
-
* @tsplus pipeable fncts.io.Channel
|
330
|
+
* @tsplus pipeable fncts.io.Channel contramapEnvironment
|
327
331
|
*/
|
328
|
-
function
|
332
|
+
function contramapEnvironment(f) {
|
329
333
|
return self => {
|
330
|
-
return
|
334
|
+
return tsplus_module_5.flatMap(env0 => provideEnvironment_1(() => f(env0))(self))(ask_1());
|
331
335
|
};
|
332
336
|
}
|
333
|
-
function contramapInReader(f) {
|
334
|
-
return readWith_1(_in => tsplus_module_1.zipRight(contramapInReader(f))(writeNow_1(f(_in))), failNow_1, done => tsplus_module_1.endNow(done));
|
335
|
-
}
|
336
337
|
/**
|
337
338
|
* @tsplus pipeable fncts.io.Channel contramapIn
|
338
339
|
*/
|
@@ -341,28 +342,34 @@ function contramapIn(f) {
|
|
341
342
|
return pipeTo_1(self)(contramapInReader(f));
|
342
343
|
};
|
343
344
|
}
|
344
|
-
function contramapIOReader(f) {
|
345
|
-
return readWith_1(_in => tsplus_module_1.zipRight(contramapIOReader(f))(writeNow_1(_in)), failNow_1, done0 => fromIO_1(() => f(done0)));
|
346
|
-
}
|
347
345
|
/**
|
348
|
-
* @tsplus pipeable fncts.io.Channel
|
346
|
+
* @tsplus pipeable fncts.io.Channel contramapInIO
|
349
347
|
*/
|
350
|
-
function
|
348
|
+
function contramapInIO(f) {
|
351
349
|
return self => {
|
352
|
-
return pipeTo_1(self)(
|
350
|
+
return pipeTo_1(self)(contramapInIOReader(f));
|
353
351
|
};
|
354
352
|
}
|
355
353
|
function contramapInIOReader(f) {
|
356
|
-
return readWith_1(inp =>
|
354
|
+
return readWith_1(inp => tsplus_module_5.zipRight(contramapInIOReader(f))(tsplus_module_5.flatMap(writeNow_1)(fromIO_1(() => f(inp)))), failNow_1, tsplus_module_5.endNow);
|
355
|
+
}
|
356
|
+
function contramapInReader(f) {
|
357
|
+
return readWith_1(_in => tsplus_module_5.zipRight(contramapInReader(f))(writeNow_1(f(_in))), failNow_1, done => tsplus_module_5.endNow(done));
|
357
358
|
}
|
358
359
|
/**
|
359
|
-
* @tsplus pipeable fncts.io.Channel
|
360
|
+
* @tsplus pipeable fncts.io.Channel contramapIO
|
360
361
|
*/
|
361
|
-
function
|
362
|
+
function contramapIO(f) {
|
362
363
|
return self => {
|
363
|
-
return pipeTo_1(self)(
|
364
|
+
return pipeTo_1(self)(contramapIOReader(f));
|
364
365
|
};
|
365
366
|
}
|
367
|
+
function contramapIOReader(f) {
|
368
|
+
return readWith_1(_in => tsplus_module_5.zipRight(contramapIOReader(f))(writeNow_1(_in)), failNow_1, done0 => fromIO_1(() => f(done0)));
|
369
|
+
}
|
370
|
+
function contramapReader(f) {
|
371
|
+
return readWith_1(_in => tsplus_module_5.zipRight(contramapReader(f))(writeNow_1(_in)), failNow_1, done => tsplus_module_5.endNow(f(done)));
|
372
|
+
}
|
366
373
|
/**
|
367
374
|
* @tsplus static fncts.io.ChannelOps defer
|
368
375
|
*/
|
@@ -371,11 +378,6 @@ function defer_1(effect) {
|
|
371
378
|
op.i0 = effect;
|
372
379
|
return op;
|
373
380
|
}
|
374
|
-
function doneCollectReader(builder) {
|
375
|
-
return readWith_1(out => tsplus_module_1.zipRight(doneCollectReader(builder))(fromIO_1(() => tsplus_module_4.succeed(() => {
|
376
|
-
builder.append(out);
|
377
|
-
}, fileName_1 + ":448:19"))), failNow_1, tsplus_module_1.endNow);
|
378
|
-
}
|
379
381
|
/**
|
380
382
|
* Returns a new channel, which is the same as this one, except that all the outputs are
|
381
383
|
* collected and bundled into a tuple together with the terminal value of this channel.
|
@@ -387,10 +389,15 @@ function doneCollectReader(builder) {
|
|
387
389
|
* @tsplus getter fncts.io.Channel doneCollect
|
388
390
|
*/
|
389
391
|
function doneCollect_1(self) {
|
390
|
-
return unwrap_1(() =>
|
392
|
+
return unwrap_1(() => tsplus_module_2.succeed(() => {
|
391
393
|
const builder = tsplus_module_10.builder();
|
392
|
-
return mapIO_1(z =>
|
393
|
-
}, fileName_1 + ":
|
394
|
+
return mapIO_1(z => tsplus_module_2.succeedNow((0, _function.tuple)(builder.result(), z), fileName_1 + ":470:80"))(pipeTo_1(doneCollectReader(builder))(self));
|
395
|
+
}, fileName_1 + ":468:15"));
|
396
|
+
}
|
397
|
+
function doneCollectReader(builder) {
|
398
|
+
return readWith_1(out => tsplus_module_5.zipRight(doneCollectReader(builder))(fromIO_1(() => tsplus_module_2.succeed(() => {
|
399
|
+
builder.append(out);
|
400
|
+
}, fileName_1 + ":481:19"))), failNow_1, tsplus_module_5.endNow);
|
394
401
|
}
|
395
402
|
/**
|
396
403
|
* Returns a new channel which reads all the elements from upstream's output channel
|
@@ -399,9 +406,22 @@ function doneCollect_1(self) {
|
|
399
406
|
* @tsplus getter fncts.io.Channel drain
|
400
407
|
*/
|
401
408
|
function drain(channel) {
|
402
|
-
const drainer = readWithCause_1(_ => drainer,
|
409
|
+
const drainer = readWithCause_1(_ => drainer, tsplus_module_5.failCauseNow, tsplus_module_5.endNow);
|
403
410
|
return pipeTo_1(drainer)(channel);
|
404
411
|
}
|
412
|
+
/**
|
413
|
+
* Embed inputs from continuos pulling of a producer
|
414
|
+
*
|
415
|
+
* @tsplus pipeable fncts.io.Channel embedInput
|
416
|
+
*/
|
417
|
+
function embedInput(input) {
|
418
|
+
return self => {
|
419
|
+
const op = new _definition3.ChannelPrimitive(4 /* ChannelTag.Bridge */);
|
420
|
+
op.i0 = input;
|
421
|
+
op.i1 = self;
|
422
|
+
return op;
|
423
|
+
};
|
424
|
+
}
|
405
425
|
/**
|
406
426
|
* Returns a new channel that collects the output and terminal value of this channel, which it
|
407
427
|
* then writes as output of the returned channel.
|
@@ -409,7 +429,7 @@ function drain(channel) {
|
|
409
429
|
* @tsplus getter fncts.io.Channel emitCollect
|
410
430
|
*/
|
411
431
|
function emitCollect(self) {
|
412
|
-
return
|
432
|
+
return tsplus_module_5.flatMap(t => writeNow_1(t))(doneCollect_1(self));
|
413
433
|
}
|
414
434
|
/**
|
415
435
|
* @tsplus pipeable fncts.io.Channel ensuring
|
@@ -433,19 +453,6 @@ function ensuringWith_1(finalizer) {
|
|
433
453
|
return op;
|
434
454
|
};
|
435
455
|
}
|
436
|
-
/**
|
437
|
-
* Embed inputs from continuos pulling of a producer
|
438
|
-
*
|
439
|
-
* @tsplus pipeable fncts.io.Channel embedInput
|
440
|
-
*/
|
441
|
-
function embedInput(input) {
|
442
|
-
return self => {
|
443
|
-
const op = new _definition3.ChannelPrimitive(4 /* ChannelTag.Bridge */);
|
444
|
-
op.i0 = input;
|
445
|
-
op.i1 = self;
|
446
|
-
return op;
|
447
|
-
};
|
448
|
-
}
|
449
456
|
/**
|
450
457
|
* Halt a channel with the specified error
|
451
458
|
*
|
@@ -473,19 +480,19 @@ function failNow_1(error) {
|
|
473
480
|
* @tsplus getter fncts.io.Channel flatten
|
474
481
|
*/
|
475
482
|
function flatten_1(self) {
|
476
|
-
return
|
483
|
+
return tsplus_module_5.flatMap(_function.identity)(self);
|
477
484
|
}
|
478
485
|
/**
|
479
486
|
* @tsplus static fncts.io.ChannelOps fromEither
|
480
487
|
*/
|
481
488
|
function fromEither(either) {
|
482
|
-
return defer_1(() => tsplus_module_12.match(failNow_1,
|
489
|
+
return defer_1(() => tsplus_module_12.match(failNow_1, tsplus_module_5.succeedNow)(either()));
|
483
490
|
}
|
484
491
|
/**
|
485
492
|
* @tsplus static fncts.io.ChannelOps fromInput
|
486
493
|
*/
|
487
494
|
function fromInput_1(input) {
|
488
|
-
return unwrap_1(() => input.takeWith(
|
495
|
+
return unwrap_1(() => input.takeWith(tsplus_module_5.failCauseNow, elem => tsplus_module_5.zipRight(fromInput_1(input))(writeNow_1(elem)), tsplus_module_5.endNow));
|
489
496
|
}
|
490
497
|
/**
|
491
498
|
* Use an effect to end a channel
|
@@ -503,77 +510,48 @@ function fromIO_1(io) {
|
|
503
510
|
* @tsplus static fncts.io.ChannelOps fromOption
|
504
511
|
*/
|
505
512
|
function fromOption(option) {
|
506
|
-
return defer_1(() => tsplus_module_17.match(() => failNow_1(tsplus_module_14.nothing(fileName_1 + ":
|
513
|
+
return defer_1(() => tsplus_module_17.match(() => failNow_1(tsplus_module_14.nothing(fileName_1 + ":662:68")), tsplus_module_5.succeedNow)(option()));
|
507
514
|
}
|
508
515
|
/**
|
509
516
|
* @tsplus static fncts.io.ChannelOps fromQueue
|
510
517
|
*/
|
511
518
|
function fromQueue_1(queue) {
|
512
|
-
return
|
513
|
-
}
|
514
|
-
/**
|
515
|
-
* Provides the channel with its required environment, which eliminates
|
516
|
-
* its dependency on `Env`.
|
517
|
-
*
|
518
|
-
* @tsplus pipeable fncts.io.Channel provideEnvironment
|
519
|
-
*/
|
520
|
-
function provideEnvironment_1(env) {
|
521
|
-
return self => {
|
522
|
-
return defer_1(() => {
|
523
|
-
const op = new _definition3.ChannelPrimitive(14 /* ChannelTag.Provide */);
|
524
|
-
op.i0 = env();
|
525
|
-
op.i1 = self;
|
526
|
-
return op;
|
527
|
-
});
|
528
|
-
};
|
529
|
-
}
|
530
|
-
/**
|
531
|
-
* @tsplus pipeable fncts.io.Channel contramapEnvironment
|
532
|
-
*/
|
533
|
-
function contramapEnvironment(f) {
|
534
|
-
return self => {
|
535
|
-
return tsplus_module_1.flatMap(env0 => provideEnvironment_1(() => f(env0))(self))(ask_1());
|
536
|
-
};
|
519
|
+
return tsplus_module_5.flatMap(_ => tsplus_module_12.match(_ => tsplus_module_18.match(tsplus_module_5.failCauseNow, tsplus_module_5.endNow)(_), elem => tsplus_module_5.zipRight(fromQueue_1(queue))(writeNow_1(elem)))(_))(fromIO_1(() => tsplus_module_19.take(queue, fileName_1 + ":671:30")));
|
537
520
|
}
|
538
521
|
/**
|
539
522
|
* Halt a channel with the specified exception
|
540
523
|
*
|
541
|
-
* @tsplus static fncts.io.ChannelOps
|
524
|
+
* @tsplus static fncts.io.ChannelOps halt
|
542
525
|
*/
|
543
|
-
function
|
526
|
+
function halt(defect) {
|
544
527
|
const op = new _definition3.ChannelPrimitive(7 /* ChannelTag.Halt */);
|
545
|
-
op.i0 = () => tsplus_module_11.halt(defect);
|
528
|
+
op.i0 = () => tsplus_module_11.halt(defect());
|
546
529
|
return op;
|
547
530
|
}
|
548
531
|
/**
|
549
532
|
* Halt a channel with the specified exception
|
550
533
|
*
|
551
|
-
* @tsplus static fncts.io.ChannelOps
|
534
|
+
* @tsplus static fncts.io.ChannelOps haltNow
|
552
535
|
*/
|
553
|
-
function
|
536
|
+
function haltNow_1(defect) {
|
554
537
|
const op = new _definition3.ChannelPrimitive(7 /* ChannelTag.Halt */);
|
555
|
-
op.i0 = () => tsplus_module_11.halt(defect
|
538
|
+
op.i0 = () => tsplus_module_11.halt(defect);
|
556
539
|
return op;
|
557
540
|
}
|
558
541
|
/**
|
559
542
|
* @tsplus static fncts.io.ChannelOps id
|
560
543
|
*/
|
561
544
|
function id_1() {
|
562
|
-
return readWith_1(_in =>
|
545
|
+
return readWith_1(_in => tsplus_module_5.zipRight(id_1())(write_1(() => _in)), failNow_1, tsplus_module_5.endNow);
|
563
546
|
}
|
564
547
|
/**
|
565
548
|
* @tsplus static fncts.io.ChannelOps interrupt
|
566
549
|
*/
|
567
550
|
function interrupt(fiberId) {
|
568
|
-
return
|
551
|
+
return tsplus_module_5.failCauseNow(tsplus_module_11.interrupt(fiberId));
|
569
552
|
}
|
570
|
-
|
571
|
-
|
572
|
-
*
|
573
|
-
* @tsplus static fncts.io.ChannelOps scoped
|
574
|
-
*/
|
575
|
-
function scoped_1(io) {
|
576
|
-
return unwrap_1(() => tsplus_module_6.uninterruptibleMask(restore => tsplus_module_4.map(scope => acquireReleaseOutExitWith_1(tsplus_module_4.tapErrorCause(cause => scope.close(() => tsplus_module_20.failCause(cause, fileName_1 + ":745:88")), fileName_1 + ":745:50")(restore(tsplus_module_21.extend(io, fileName_1 + ":745:31")(scope), fileName_1 + ":745:18")), (_, exit) => scope.close(() => exit)), fileName_1 + ":743:21")(tsplus_module_21.make), fileName_1 + ":742:27"));
|
553
|
+
function isChannelFailure(u) {
|
554
|
+
return tsplus_module_20.isObject(u) && ChannelFailureTypeId in u;
|
577
555
|
}
|
578
556
|
/**
|
579
557
|
* Returns a new channel, which is the same as this one, except the failure value of the returned
|
@@ -593,7 +571,7 @@ function mapError(f) {
|
|
593
571
|
*/
|
594
572
|
function mapErrorCause_1(f) {
|
595
573
|
return self => {
|
596
|
-
return catchAllCause_1(cause =>
|
574
|
+
return catchAllCause_1(cause => tsplus_module_5.failCauseNow(f(cause)))(self);
|
597
575
|
};
|
598
576
|
}
|
599
577
|
/**
|
@@ -605,7 +583,7 @@ function mapErrorCause_1(f) {
|
|
605
583
|
*/
|
606
584
|
function mapIO_1(f) {
|
607
585
|
return self => {
|
608
|
-
return
|
586
|
+
return tsplus_module_5.flatMap(outDone => fromIO_1(() => f(outDone)))(self);
|
609
587
|
};
|
610
588
|
}
|
611
589
|
/**
|
@@ -615,11 +593,35 @@ function mapIO_1(f) {
|
|
615
593
|
*/
|
616
594
|
function mapOut(f) {
|
617
595
|
return self => {
|
618
|
-
const reader = readWith_1(out =>
|
596
|
+
const reader = readWith_1(out => tsplus_module_5.zipRight(reader)(writeNow_1(f(out))), failNow_1, tsplus_module_5.endNow);
|
619
597
|
return pipeTo_1(reader)(self);
|
620
598
|
};
|
621
599
|
}
|
622
|
-
|
600
|
+
/**
|
601
|
+
* Provides the channel with its required environment, which eliminates
|
602
|
+
* its dependency on `Env`.
|
603
|
+
*
|
604
|
+
* @tsplus pipeable fncts.io.Channel provideEnvironment
|
605
|
+
*/
|
606
|
+
function provideEnvironment_1(env) {
|
607
|
+
return self => {
|
608
|
+
return defer_1(() => {
|
609
|
+
const op = new _definition3.ChannelPrimitive(14 /* ChannelTag.Provide */);
|
610
|
+
op.i0 = env();
|
611
|
+
op.i1 = self;
|
612
|
+
return op;
|
613
|
+
});
|
614
|
+
};
|
615
|
+
}
|
616
|
+
/**
|
617
|
+
* Use a managed to emit an output element
|
618
|
+
*
|
619
|
+
* @tsplus static fncts.io.ChannelOps scoped
|
620
|
+
*/
|
621
|
+
function scoped_1(io) {
|
622
|
+
return unwrap_1(() => tsplus_module_4.uninterruptibleMask(restore => tsplus_module_2.map(scope => acquireReleaseOutExitWith_1(tsplus_module_2.tapErrorCause(cause => scope.close(() => tsplus_module_21.failCause(cause, fileName_1 + ":810:88")), fileName_1 + ":810:50")(restore(tsplus_module_22.extend(io, fileName_1 + ":810:31")(scope), fileName_1 + ":810:18")), (_, exit) => scope.close(() => exit)), fileName_1 + ":808:21")(tsplus_module_22.make), fileName_1 + ":807:27"));
|
623
|
+
}
|
624
|
+
const mapOutIOReader = f => readWithCause_1(out => tsplus_module_5.zipRight(mapOutIOReader(f))(tsplus_module_5.flatMap(writeNow_1)(fromIO_1(() => f(out)))), tsplus_module_5.failCauseNow, tsplus_module_5.succeedNow);
|
623
625
|
/**
|
624
626
|
* @tsplus pipeable fncts.io.Channel mapOutIO
|
625
627
|
*/
|
@@ -651,10 +653,10 @@ function matchCauseChannel_1(onError, onSuccess) {
|
|
651
653
|
*/
|
652
654
|
function matchChannel(onError, onSuccess) {
|
653
655
|
return channel => {
|
654
|
-
return matchCauseChannel_1(cause => tsplus_module_12.match(onError,
|
656
|
+
return matchCauseChannel_1(cause => tsplus_module_12.match(onError, tsplus_module_5.failCauseNow)(tsplus_module_11.failureOrCause(cause)), onSuccess)(channel);
|
655
657
|
};
|
656
658
|
}
|
657
|
-
const never = exports.never = /*#__PURE__*/fromIO_1(() =>
|
659
|
+
const never = exports.never = /*#__PURE__*/fromIO_1(() => tsplus_module_23.never);
|
658
660
|
/**
|
659
661
|
* Returns a new channel that will perform the operations of this one, until failure, and then
|
660
662
|
* it will switch over to the operations of the specified fallback channel.
|
@@ -704,36 +706,41 @@ class ChannelFailure {
|
|
704
706
|
}
|
705
707
|
}
|
706
708
|
_a = ChannelFailureTypeId;
|
707
|
-
function isChannelFailure(u) {
|
708
|
-
return tsplus_module_23.isObject(u) && ChannelFailureTypeId in u;
|
709
|
-
}
|
710
709
|
/**
|
711
710
|
* @tsplus pipeable fncts.io.Channel pipeToOrFail
|
712
711
|
* @tsplus pipeable-operator fncts.io.Channel >>>
|
713
712
|
*/
|
714
713
|
function pipeToOrFail(right) {
|
715
714
|
return left => {
|
716
|
-
return catchAllCause_1(cause => tsplus_module_11.isHalt(cause) && isChannelFailure(cause.value) ? failNow_1(cause.value.error) : haltNow_1(cause))(pipeTo_1(right)(catchAll_1(err =>
|
715
|
+
return catchAllCause_1(cause => tsplus_module_11.isHalt(cause) && isChannelFailure(cause.value) ? failNow_1(cause.value.error) : haltNow_1(cause))(pipeTo_1(right)(catchAll_1(err => tsplus_module_5.failCauseNow(tsplus_module_11.halt(new ChannelFailure(err))))(left)));
|
717
716
|
};
|
718
717
|
}
|
719
718
|
/**
|
720
719
|
* @tsplus static fncts.io.ChannelOps read
|
721
720
|
*/
|
722
721
|
function read() {
|
723
|
-
return readOrFail_1(tsplus_module_14.nothing(fileName_1 + ":
|
722
|
+
return readOrFail_1(tsplus_module_14.nothing(fileName_1 + ":1027:36"));
|
724
723
|
}
|
725
724
|
/**
|
726
725
|
* @tsplus static fncts.io.ChannelOps readOrFail
|
727
726
|
*/
|
728
727
|
function readOrFail_1(e) {
|
729
728
|
const op = new _definition3.ChannelPrimitive(5 /* ChannelTag.Read */);
|
730
|
-
op.i0 =
|
729
|
+
op.i0 = tsplus_module_5.endNow;
|
731
730
|
const continuation = new _definition3.ChannelPrimitive(1 /* ChannelTag.ContinuationK */);
|
732
731
|
continuation.i0 = () => failNow_1(e);
|
733
732
|
continuation.i1 = () => failNow_1(e);
|
734
733
|
op.i1 = continuation;
|
735
734
|
return op;
|
736
735
|
}
|
736
|
+
/**
|
737
|
+
* Reads an input and continue exposing both error and completion
|
738
|
+
*
|
739
|
+
* @tsplus static fncts.io.ChannelOps readWith
|
740
|
+
*/
|
741
|
+
function readWith_1(inp, error, done) {
|
742
|
+
return readWithCause_1(inp, c => tsplus_module_12.match(error, tsplus_module_5.failCauseNow)(tsplus_module_11.failureOrCause(c)), done);
|
743
|
+
}
|
737
744
|
/**
|
738
745
|
* Reads an input and continue exposing both full error cause and completion
|
739
746
|
*
|
@@ -748,21 +755,13 @@ function readWithCause_1(inp, halt, done) {
|
|
748
755
|
op.i1 = continuation;
|
749
756
|
return op;
|
750
757
|
}
|
751
|
-
/**
|
752
|
-
* Reads an input and continue exposing both error and completion
|
753
|
-
*
|
754
|
-
* @tsplus static fncts.io.ChannelOps readWith
|
755
|
-
*/
|
756
|
-
function readWith_1(inp, error, done) {
|
757
|
-
return readWithCause_1(inp, c => tsplus_module_12.match(error, tsplus_module_1.failCauseNow)(tsplus_module_11.failureOrCause(c)), done);
|
758
|
-
}
|
759
758
|
/**
|
760
759
|
* Repeats this channel forever
|
761
760
|
*
|
762
761
|
* @tsplus getter fncts.io.Channel repeated
|
763
762
|
*/
|
764
763
|
function repeated_1(self) {
|
765
|
-
return
|
764
|
+
return tsplus_module_5.flatMap(() => repeated_1(self))(self);
|
766
765
|
}
|
767
766
|
/**
|
768
767
|
* @tsplus static fncts.io.ChannelOps toQueue
|
@@ -770,7 +769,7 @@ function repeated_1(self) {
|
|
770
769
|
function toQueue_1(queue) {
|
771
770
|
return defer_1(() => {
|
772
771
|
function toQueue(queue) {
|
773
|
-
return readWithCause_1(inp =>
|
772
|
+
return readWithCause_1(inp => tsplus_module_5.zipRight(toQueue(queue))(fromIO_1(() => tsplus_module_19.offer(tsplus_module_24.right(inp, fileName_1 + ":1151:57"), fileName_1 + ":1151:44")(queue))), cause => fromIO_1(() => tsplus_module_19.offer(tsplus_module_24.left(tsplus_module_21.failCause(cause, fileName_1 + ":1152:73"), fileName_1 + ":1152:58"), fileName_1 + ":1152:46")(queue)), done => fromIO_1(() => tsplus_module_19.offer(tsplus_module_24.left(tsplus_module_21.succeed(done, fileName_1 + ":1153:70"), fileName_1 + ":1153:57"), fileName_1 + ":1153:45")(queue)));
|
774
773
|
}
|
775
774
|
return toQueue(queue());
|
776
775
|
});
|
@@ -791,16 +790,16 @@ function write_1(out) {
|
|
791
790
|
function writeAll(outs) {
|
792
791
|
return writeChunk_1(tsplus_module_25.from(outs));
|
793
792
|
}
|
794
|
-
function writeChunkWriter(outs, idx, len) {
|
795
|
-
if (idx === len) return unit_1;
|
796
|
-
return tsplus_module_1.zipRight(writeChunkWriter(outs, idx + 1, len))(writeNow_1(tsplus_module_10.unsafeGet(idx)(outs)));
|
797
|
-
}
|
798
793
|
/**
|
799
794
|
* @tsplus static fncts.io.ChannelOps writeChunk
|
800
795
|
*/
|
801
796
|
function writeChunk_1(outs) {
|
802
797
|
return writeChunkWriter(outs, 0, outs.length);
|
803
798
|
}
|
799
|
+
function writeChunkWriter(outs, idx, len) {
|
800
|
+
if (idx === len) return unit_1;
|
801
|
+
return tsplus_module_5.zipRight(writeChunkWriter(outs, idx + 1, len))(writeNow_1(tsplus_module_10.unsafeGet(idx)(outs)));
|
802
|
+
}
|
804
803
|
/**
|
805
804
|
* Writes an output to the channel
|
806
805
|
*
|
@@ -814,8 +813,20 @@ function writeNow_1(out) {
|
|
814
813
|
/**
|
815
814
|
* @tsplus static fncts.io.ChannelOps unit
|
816
815
|
*/
|
817
|
-
const unit_1 = /*#__PURE__*/
|
816
|
+
const unit_1 = /*#__PURE__*/tsplus_module_5.endNow(undefined);
|
818
817
|
const unit = exports.unit = unit_1;
|
818
|
+
/**
|
819
|
+
* @tsplus static fncts.io.ChannelOps fromHubScoped
|
820
|
+
*/
|
821
|
+
function fromHubScoped(hub) {
|
822
|
+
return tsplus_module_2.defer(() => tsplus_module_2.map(fromQueue_1, fileName_1 + ":1216:38")(tsplus_module_26.subscribe(hub(), fileName_1 + ":1216:24")), fileName_1 + ":1216:18");
|
823
|
+
}
|
824
|
+
/**
|
825
|
+
* @tsplus static fncts.io.ChannelOps toHub
|
826
|
+
*/
|
827
|
+
function toHub(hub) {
|
828
|
+
return toQueue_1(hub);
|
829
|
+
}
|
819
830
|
/**
|
820
831
|
* Makes a channel from an effect that returns a channel in case of success
|
821
832
|
*
|
@@ -832,16 +843,4 @@ function unwrap_1(self) {
|
|
832
843
|
function unwrapScoped(self) {
|
833
844
|
return concatAllWith_1((d, _) => d, (d, _) => d)(scoped_1(self));
|
834
845
|
}
|
835
|
-
/**
|
836
|
-
* @tsplus static fncts.io.ChannelOps fromHubScoped
|
837
|
-
*/
|
838
|
-
function fromHubScoped(hub) {
|
839
|
-
return tsplus_module_4.defer(() => tsplus_module_4.map(fromQueue_1, fileName_1 + ":1240:38")(tsplus_module_26.subscribe(hub(), fileName_1 + ":1240:24")), fileName_1 + ":1240:18");
|
840
|
-
}
|
841
|
-
/**
|
842
|
-
* @tsplus static fncts.io.ChannelOps toHub
|
843
|
-
*/
|
844
|
-
function toHub(hub) {
|
845
|
-
return toQueue_1(hub);
|
846
|
-
}
|
847
846
|
//# sourceMappingURL=api.cjs.map
|