@fncts/io 0.0.47 → 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/AsyncInputConsumer.cjs +0 -4
- package/_cjs/Channel/internal/AsyncInputProducer.cjs +0 -4
- 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/RuntimeFlag.cjs +0 -4
- 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/global.cjs +0 -4
- package/_cjs/index.cjs +0 -4
- 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/AsyncInputConsumer.mjs +1 -1
- package/_mjs/Channel/internal/AsyncInputProducer.mjs +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/RuntimeFlag.mjs +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/_mjs/global.mjs +1 -1
- package/_mjs/index.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/_mjs/Channel/api.mjs
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
var _a;
|
2
2
|
const fileName_1 = "(@fncts/io) src/Channel/api.ts";
|
3
|
-
import * as tsplus_module_1 from "@fncts/io/
|
4
|
-
import * as tsplus_module_2 from "@fncts/io/IO/api
|
5
|
-
import * as tsplus_module_3 from "@fncts/io/Ref/api/
|
6
|
-
import * as tsplus_module_4 from "@fncts/io/IO/api";
|
7
|
-
import * as tsplus_module_5 from "@fncts/io/
|
8
|
-
import * as tsplus_module_6 from "@fncts/io/
|
9
|
-
import * as tsplus_module_7 from "@fncts/io/
|
3
|
+
import * as tsplus_module_1 from "@fncts/io/Ref/api/get";
|
4
|
+
import * as tsplus_module_2 from "@fncts/io/IO/api";
|
5
|
+
import * as tsplus_module_3 from "@fncts/io/Ref/api/set";
|
6
|
+
import * as tsplus_module_4 from "@fncts/io/IO/api/interrupt";
|
7
|
+
import * as tsplus_module_5 from "@fncts/io/Channel/core-api";
|
8
|
+
import * as tsplus_module_6 from "@fncts/io/Ref/constructors";
|
9
|
+
import * as tsplus_module_7 from "@fncts/io/IO/api/environment";
|
10
10
|
import * as tsplus_module_8 from "@fncts/io/Ref/api/modify";
|
11
11
|
import * as tsplus_module_9 from "@fncts/base/collection/immutable/Conc/api/empty";
|
12
12
|
import * as tsplus_module_10 from "@fncts/base/collection/immutable/Conc/api";
|
@@ -19,22 +19,22 @@ import * as tsplus_module_16 from "@fncts/io/Channel/ChildExecutorDecision/defin
|
|
19
19
|
import * as tsplus_module_17 from "@fncts/base/data/Maybe/destructors";
|
20
20
|
import * as tsplus_module_18 from "@fncts/base/data/Exit/api";
|
21
21
|
import * as tsplus_module_19 from "@fncts/io/Queue/api/operations";
|
22
|
-
import * as tsplus_module_20 from "@fncts/base/
|
23
|
-
import * as tsplus_module_21 from "@fncts/
|
24
|
-
import * as tsplus_module_22 from "@fncts/io/
|
25
|
-
import * as tsplus_module_23 from "@fncts/
|
22
|
+
import * as tsplus_module_20 from "@fncts/base/util/predicates";
|
23
|
+
import * as tsplus_module_21 from "@fncts/base/data/Exit/constructors";
|
24
|
+
import * as tsplus_module_22 from "@fncts/io/Scope/api";
|
25
|
+
import * as tsplus_module_23 from "@fncts/io/IO/api/asyncInterrupt";
|
26
26
|
import * as tsplus_module_24 from "@fncts/base/data/Either/constructors";
|
27
27
|
import * as tsplus_module_25 from "@fncts/base/collection/immutable/Conc/constructors";
|
28
28
|
import * as tsplus_module_26 from "@fncts/io/Hub/api";
|
29
|
-
export const as_ = as_1;
|
30
|
-
export const ask = ask_1;
|
31
29
|
export const acquireReleaseExitWith = acquireReleaseExitWith_1;
|
32
30
|
export const acquireReleaseOutExitWith = acquireReleaseOutExitWith_1;
|
31
|
+
export const as_ = as_1;
|
32
|
+
export const ask = ask_1;
|
33
33
|
export const buffer = buffer_1;
|
34
34
|
export const catchAll = catchAll_1;
|
35
35
|
export const catchAllCause = catchAllCause_1;
|
36
|
-
export const concatMapWith = concatMapWith_1;
|
37
36
|
export const concatAllWith = concatAllWith_1;
|
37
|
+
export const concatMapWith = concatMapWith_1;
|
38
38
|
export const defer = defer_1;
|
39
39
|
export const doneCollect = doneCollect_1;
|
40
40
|
export const ensuringWith = ensuringWith_1;
|
@@ -43,18 +43,18 @@ export const flatten = flatten_1;
|
|
43
43
|
export const fromInput = fromInput_1;
|
44
44
|
export const fromIO = fromIO_1;
|
45
45
|
export const fromQueue = fromQueue_1;
|
46
|
-
export const provideEnvironment = provideEnvironment_1;
|
47
46
|
export const haltNow = haltNow_1;
|
48
47
|
export const id = id_1;
|
49
|
-
export const scoped = scoped_1;
|
50
48
|
export const mapErrorCause = mapErrorCause_1;
|
51
49
|
export const mapIO = mapIO_1;
|
50
|
+
export const provideEnvironment = provideEnvironment_1;
|
51
|
+
export const scoped = scoped_1;
|
52
52
|
export const matchCauseChannel = matchCauseChannel_1;
|
53
53
|
export const orHaltWith = orHaltWith_1;
|
54
54
|
export const pipeTo = pipeTo_1;
|
55
55
|
export const readOrFail = readOrFail_1;
|
56
|
-
export const readWithCause = readWithCause_1;
|
57
56
|
export const readWith = readWith_1;
|
57
|
+
export const readWithCause = readWithCause_1;
|
58
58
|
export const repeated = repeated_1;
|
59
59
|
export const toQueue = toQueue_1;
|
60
60
|
export const write = write_1;
|
@@ -64,29 +64,29 @@ export const unwrap = unwrap_1;
|
|
64
64
|
import { identity, tuple } from "@fncts/base/data/function";
|
65
65
|
import { ChannelPrimitive } from "@fncts/io/Channel/definition";
|
66
66
|
/**
|
67
|
-
*
|
68
|
-
* is the specified constant value.
|
69
|
-
*
|
70
|
-
* This method produces the same result as mapping this channel to the specified constant value.
|
71
|
-
*
|
72
|
-
* @tsplus pipeable fncts.io.Channel as
|
67
|
+
* @tsplus static fncts.io.ChannelOps acquireReleaseExitWith
|
73
68
|
*/
|
74
|
-
function
|
75
|
-
return
|
76
|
-
return tsplus_module_1.map(() => z2())(self);
|
77
|
-
};
|
69
|
+
function acquireReleaseExitWith_1(acquire, use, release) {
|
70
|
+
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")));
|
78
71
|
}
|
79
72
|
/**
|
80
|
-
*
|
73
|
+
* Construct a resource Channel with Acquire / Release
|
74
|
+
*
|
75
|
+
* @tsplus static fncts.io.ChannelOps acquireReleaseOutExitWith
|
81
76
|
*/
|
82
|
-
function
|
83
|
-
|
77
|
+
function acquireReleaseOutExitWith_1(self, release) {
|
78
|
+
const op = new ChannelPrimitive(13 /* ChannelTag.BracketOut */);
|
79
|
+
op.i0 = self;
|
80
|
+
op.i1 = release;
|
81
|
+
return op;
|
84
82
|
}
|
85
83
|
/**
|
86
|
-
*
|
84
|
+
* Construct a resource Channel with Acquire / Release
|
85
|
+
*
|
86
|
+
* @tsplus static fncts.io.ChannelOps acquireReleaseOutWith
|
87
87
|
*/
|
88
|
-
export function
|
89
|
-
return
|
88
|
+
export function acquireReleaseOutWith(acquire, release) {
|
89
|
+
return acquireReleaseOutExitWith_1(acquire, (z, _) => release(z));
|
90
90
|
}
|
91
91
|
/**
|
92
92
|
* @tsplus static fncts.io.ChannelOps acquireReleaseWith
|
@@ -95,29 +95,29 @@ export function acquireReleaseWith(acquire, use, release) {
|
|
95
95
|
return acquireReleaseExitWith_1(acquire, use, (a, _) => release(a));
|
96
96
|
}
|
97
97
|
/**
|
98
|
-
*
|
98
|
+
* Returns a new channel that is the same as this one, except the terminal value of the channel
|
99
|
+
* is the specified constant value.
|
100
|
+
*
|
101
|
+
* This method produces the same result as mapping this channel to the specified constant value.
|
102
|
+
*
|
103
|
+
* @tsplus pipeable fncts.io.Channel as
|
99
104
|
*/
|
100
|
-
function
|
101
|
-
return
|
105
|
+
function as_1(z2) {
|
106
|
+
return self => {
|
107
|
+
return tsplus_module_5.map(() => z2())(self);
|
108
|
+
};
|
102
109
|
}
|
103
110
|
/**
|
104
|
-
*
|
105
|
-
*
|
106
|
-
* @tsplus static fncts.io.ChannelOps acquireReleaseOutWith
|
111
|
+
* @tsplus static fncts.io.ChannelOps ask
|
107
112
|
*/
|
108
|
-
|
109
|
-
return
|
113
|
+
function ask_1() {
|
114
|
+
return fromIO_1(() => tsplus_module_7.environment(fileName_1 + ":83:39"));
|
110
115
|
}
|
111
116
|
/**
|
112
|
-
*
|
113
|
-
*
|
114
|
-
* @tsplus static fncts.io.ChannelOps acquireReleaseOutExitWith
|
117
|
+
* @tsplus getter fncts.io.Channel asUnit
|
115
118
|
*/
|
116
|
-
function
|
117
|
-
|
118
|
-
op.i0 = self;
|
119
|
-
op.i1 = release;
|
120
|
-
return op;
|
119
|
+
export function asUnit(self) {
|
120
|
+
return as_1(() => undefined)(self);
|
121
121
|
}
|
122
122
|
/**
|
123
123
|
* Creates a channel backed by a buffer. When the buffer is empty, the channel will simply
|
@@ -129,9 +129,9 @@ function acquireReleaseOutExitWith_1(self, release) {
|
|
129
129
|
function buffer_1(empty, isEmpty, ref) {
|
130
130
|
return unwrap_1(() => tsplus_module_8.modify(v => {
|
131
131
|
if (isEmpty(v)) {
|
132
|
-
return tuple(readWith_1(_in =>
|
132
|
+
return 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);
|
133
133
|
} else {
|
134
|
-
return tuple(
|
134
|
+
return tuple(tsplus_module_5.zipRight(buffer_1(empty, isEmpty, ref))(writeNow_1(v)), empty);
|
135
135
|
}
|
136
136
|
}, fileName_1 + ":108:15")(ref));
|
137
137
|
}
|
@@ -150,7 +150,7 @@ export function bufferChunk(ref) {
|
|
150
150
|
*/
|
151
151
|
function catchAll_1(f) {
|
152
152
|
return self => {
|
153
|
-
return catchAllCause_1(cause => tsplus_module_12.match(l => f(l), r =>
|
153
|
+
return catchAllCause_1(cause => tsplus_module_12.match(l => f(l), r => tsplus_module_5.failCauseNow(r))(tsplus_module_11.failureOrCause(cause)))(self);
|
154
154
|
};
|
155
155
|
}
|
156
156
|
/**
|
@@ -164,7 +164,7 @@ function catchAllCause_1(f) {
|
|
164
164
|
return self => {
|
165
165
|
const op = new ChannelPrimitive(3 /* ChannelTag.Fold */);
|
166
166
|
const continuation = new ChannelPrimitive(1 /* ChannelTag.ContinuationK */);
|
167
|
-
continuation.i0 =
|
167
|
+
continuation.i0 = tsplus_module_5.endNow;
|
168
168
|
continuation.i1 = f;
|
169
169
|
op.i0 = self;
|
170
170
|
op.i1 = continuation;
|
@@ -177,8 +177,8 @@ function catchAllCause_1(f) {
|
|
177
177
|
export function collectElements(self) {
|
178
178
|
return defer_1(() => {
|
179
179
|
const builder = new tsplus_module_13.ConcBuilder(tsplus_module_9.empty());
|
180
|
-
const reader = readWith_1(out =>
|
181
|
-
return
|
180
|
+
const reader = readWith_1(out => tsplus_module_5.zipRight(reader)(tsplus_module_5.succeed(() => builder.append(out))), failNow_1, tsplus_module_5.succeedNow);
|
181
|
+
return tsplus_module_5.flatMap(z => tsplus_module_5.succeedNow([builder.result(), z]))(pipeTo_1(reader)(self));
|
182
182
|
});
|
183
183
|
}
|
184
184
|
/**
|
@@ -187,6 +187,35 @@ export function collectElements(self) {
|
|
187
187
|
export function concatAll(channels) {
|
188
188
|
return concatAllWith_1(() => void 0, () => void 0)(channels);
|
189
189
|
}
|
190
|
+
/**
|
191
|
+
* Concat sequentially a channel of channels
|
192
|
+
*
|
193
|
+
* @tsplus pipeable fncts.io.Channel concatAllWith
|
194
|
+
*/
|
195
|
+
function concatAllWith_1(f, g) {
|
196
|
+
return channels => {
|
197
|
+
const op = new ChannelPrimitive(12 /* ChannelTag.ConcatAll */);
|
198
|
+
op.i0 = f;
|
199
|
+
op.i1 = g;
|
200
|
+
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":250:64"));
|
201
|
+
op.i3 = () => tsplus_module_16.Continue;
|
202
|
+
op.i4 = channels;
|
203
|
+
op.i5 = identity;
|
204
|
+
return op;
|
205
|
+
};
|
206
|
+
}
|
207
|
+
/**
|
208
|
+
* Returns a new channel whose outputs are fed to the specified factory function, which creates
|
209
|
+
* new channels in response. These new channels are sequentially concatenated together, and all
|
210
|
+
* their outputs appear as outputs of the newly returned channel.
|
211
|
+
*
|
212
|
+
* @tsplus pipeable fncts.io.Channel concatMap
|
213
|
+
*/
|
214
|
+
export function concatMap(f) {
|
215
|
+
return self => {
|
216
|
+
return concatMapWith_1(f, () => void 0, () => void 0)(self);
|
217
|
+
};
|
218
|
+
}
|
190
219
|
/**
|
191
220
|
* Returns a new channel whose outputs are fed to the specified factory function, which creates
|
192
221
|
* new channels in response. These new channels are sequentially concatenated together, and all
|
@@ -201,7 +230,7 @@ function concatMapWith_1(f, g, h) {
|
|
201
230
|
const op = new ChannelPrimitive(12 /* ChannelTag.ConcatAll */);
|
202
231
|
op.i0 = g;
|
203
232
|
op.i1 = h;
|
204
|
-
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":
|
233
|
+
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":299:64"));
|
205
234
|
op.i3 = () => tsplus_module_16.Continue;
|
206
235
|
op.i4 = channel;
|
207
236
|
op.i5 = f;
|
@@ -230,48 +259,21 @@ export function concatMapWithCustom(f, g, h, onPull, onEmit) {
|
|
230
259
|
};
|
231
260
|
}
|
232
261
|
/**
|
233
|
-
*
|
234
|
-
*
|
235
|
-
* @tsplus pipeable fncts.io.Channel concatAllWith
|
236
|
-
*/
|
237
|
-
function concatAllWith_1(f, g) {
|
238
|
-
return channels => {
|
239
|
-
const op = new ChannelPrimitive(12 /* ChannelTag.ConcatAll */);
|
240
|
-
op.i0 = f;
|
241
|
-
op.i1 = g;
|
242
|
-
op.i2 = () => tsplus_module_15.PullAfterNext(tsplus_module_14.nothing(fileName_1 + ":319:64"));
|
243
|
-
op.i3 = () => tsplus_module_16.Continue;
|
244
|
-
op.i4 = channels;
|
245
|
-
op.i5 = identity;
|
246
|
-
return op;
|
247
|
-
};
|
248
|
-
}
|
249
|
-
/**
|
250
|
-
* Returns a new channel whose outputs are fed to the specified factory function, which creates
|
251
|
-
* new channels in response. These new channels are sequentially concatenated together, and all
|
252
|
-
* their outputs appear as outputs of the newly returned channel.
|
253
|
-
*
|
254
|
-
* @tsplus pipeable fncts.io.Channel concatMap
|
262
|
+
* @tsplus pipeable fncts.io.Channel contramap
|
255
263
|
*/
|
256
|
-
export function
|
264
|
+
export function contramap(f) {
|
257
265
|
return self => {
|
258
|
-
return
|
266
|
+
return pipeTo_1(self)(contramapReader(f));
|
259
267
|
};
|
260
268
|
}
|
261
|
-
function contramapReader(f) {
|
262
|
-
return readWith_1(_in => tsplus_module_1.zipRight(contramapReader(f))(writeNow_1(_in)), failNow_1, done => tsplus_module_1.endNow(f(done)));
|
263
|
-
}
|
264
269
|
/**
|
265
|
-
* @tsplus pipeable fncts.io.Channel
|
270
|
+
* @tsplus pipeable fncts.io.Channel contramapEnvironment
|
266
271
|
*/
|
267
|
-
export function
|
272
|
+
export function contramapEnvironment(f) {
|
268
273
|
return self => {
|
269
|
-
return
|
274
|
+
return tsplus_module_5.flatMap(env0 => provideEnvironment_1(() => f(env0))(self))(ask_1());
|
270
275
|
};
|
271
276
|
}
|
272
|
-
function contramapInReader(f) {
|
273
|
-
return readWith_1(_in => tsplus_module_1.zipRight(contramapInReader(f))(writeNow_1(f(_in))), failNow_1, done => tsplus_module_1.endNow(done));
|
274
|
-
}
|
275
277
|
/**
|
276
278
|
* @tsplus pipeable fncts.io.Channel contramapIn
|
277
279
|
*/
|
@@ -280,28 +282,34 @@ export function contramapIn(f) {
|
|
280
282
|
return pipeTo_1(self)(contramapInReader(f));
|
281
283
|
};
|
282
284
|
}
|
283
|
-
function contramapIOReader(f) {
|
284
|
-
return readWith_1(_in => tsplus_module_1.zipRight(contramapIOReader(f))(writeNow_1(_in)), failNow_1, done0 => fromIO_1(() => f(done0)));
|
285
|
-
}
|
286
285
|
/**
|
287
|
-
* @tsplus pipeable fncts.io.Channel
|
286
|
+
* @tsplus pipeable fncts.io.Channel contramapInIO
|
288
287
|
*/
|
289
|
-
export function
|
288
|
+
export function contramapInIO(f) {
|
290
289
|
return self => {
|
291
|
-
return pipeTo_1(self)(
|
290
|
+
return pipeTo_1(self)(contramapInIOReader(f));
|
292
291
|
};
|
293
292
|
}
|
294
293
|
function contramapInIOReader(f) {
|
295
|
-
return readWith_1(inp =>
|
294
|
+
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);
|
295
|
+
}
|
296
|
+
function contramapInReader(f) {
|
297
|
+
return readWith_1(_in => tsplus_module_5.zipRight(contramapInReader(f))(writeNow_1(f(_in))), failNow_1, done => tsplus_module_5.endNow(done));
|
296
298
|
}
|
297
299
|
/**
|
298
|
-
* @tsplus pipeable fncts.io.Channel
|
300
|
+
* @tsplus pipeable fncts.io.Channel contramapIO
|
299
301
|
*/
|
300
|
-
export function
|
302
|
+
export function contramapIO(f) {
|
301
303
|
return self => {
|
302
|
-
return pipeTo_1(self)(
|
304
|
+
return pipeTo_1(self)(contramapIOReader(f));
|
303
305
|
};
|
304
306
|
}
|
307
|
+
function contramapIOReader(f) {
|
308
|
+
return readWith_1(_in => tsplus_module_5.zipRight(contramapIOReader(f))(writeNow_1(_in)), failNow_1, done0 => fromIO_1(() => f(done0)));
|
309
|
+
}
|
310
|
+
function contramapReader(f) {
|
311
|
+
return readWith_1(_in => tsplus_module_5.zipRight(contramapReader(f))(writeNow_1(_in)), failNow_1, done => tsplus_module_5.endNow(f(done)));
|
312
|
+
}
|
305
313
|
/**
|
306
314
|
* @tsplus static fncts.io.ChannelOps defer
|
307
315
|
*/
|
@@ -310,11 +318,6 @@ function defer_1(effect) {
|
|
310
318
|
op.i0 = effect;
|
311
319
|
return op;
|
312
320
|
}
|
313
|
-
function doneCollectReader(builder) {
|
314
|
-
return readWith_1(out => tsplus_module_1.zipRight(doneCollectReader(builder))(fromIO_1(() => tsplus_module_4.succeed(() => {
|
315
|
-
builder.append(out);
|
316
|
-
}, fileName_1 + ":448:19"))), failNow_1, tsplus_module_1.endNow);
|
317
|
-
}
|
318
321
|
/**
|
319
322
|
* Returns a new channel, which is the same as this one, except that all the outputs are
|
320
323
|
* collected and bundled into a tuple together with the terminal value of this channel.
|
@@ -326,10 +329,15 @@ function doneCollectReader(builder) {
|
|
326
329
|
* @tsplus getter fncts.io.Channel doneCollect
|
327
330
|
*/
|
328
331
|
function doneCollect_1(self) {
|
329
|
-
return unwrap_1(() =>
|
332
|
+
return unwrap_1(() => tsplus_module_2.succeed(() => {
|
330
333
|
const builder = tsplus_module_10.builder();
|
331
|
-
return mapIO_1(z =>
|
332
|
-
}, fileName_1 + ":
|
334
|
+
return mapIO_1(z => tsplus_module_2.succeedNow(tuple(builder.result(), z), fileName_1 + ":470:80"))(pipeTo_1(doneCollectReader(builder))(self));
|
335
|
+
}, fileName_1 + ":468:15"));
|
336
|
+
}
|
337
|
+
function doneCollectReader(builder) {
|
338
|
+
return readWith_1(out => tsplus_module_5.zipRight(doneCollectReader(builder))(fromIO_1(() => tsplus_module_2.succeed(() => {
|
339
|
+
builder.append(out);
|
340
|
+
}, fileName_1 + ":481:19"))), failNow_1, tsplus_module_5.endNow);
|
333
341
|
}
|
334
342
|
/**
|
335
343
|
* Returns a new channel which reads all the elements from upstream's output channel
|
@@ -338,9 +346,22 @@ function doneCollect_1(self) {
|
|
338
346
|
* @tsplus getter fncts.io.Channel drain
|
339
347
|
*/
|
340
348
|
export function drain(channel) {
|
341
|
-
const drainer = readWithCause_1(_ => drainer,
|
349
|
+
const drainer = readWithCause_1(_ => drainer, tsplus_module_5.failCauseNow, tsplus_module_5.endNow);
|
342
350
|
return pipeTo_1(drainer)(channel);
|
343
351
|
}
|
352
|
+
/**
|
353
|
+
* Embed inputs from continuos pulling of a producer
|
354
|
+
*
|
355
|
+
* @tsplus pipeable fncts.io.Channel embedInput
|
356
|
+
*/
|
357
|
+
export function embedInput(input) {
|
358
|
+
return self => {
|
359
|
+
const op = new ChannelPrimitive(4 /* ChannelTag.Bridge */);
|
360
|
+
op.i0 = input;
|
361
|
+
op.i1 = self;
|
362
|
+
return op;
|
363
|
+
};
|
364
|
+
}
|
344
365
|
/**
|
345
366
|
* Returns a new channel that collects the output and terminal value of this channel, which it
|
346
367
|
* then writes as output of the returned channel.
|
@@ -348,7 +369,7 @@ export function drain(channel) {
|
|
348
369
|
* @tsplus getter fncts.io.Channel emitCollect
|
349
370
|
*/
|
350
371
|
export function emitCollect(self) {
|
351
|
-
return
|
372
|
+
return tsplus_module_5.flatMap(t => writeNow_1(t))(doneCollect_1(self));
|
352
373
|
}
|
353
374
|
/**
|
354
375
|
* @tsplus pipeable fncts.io.Channel ensuring
|
@@ -372,19 +393,6 @@ function ensuringWith_1(finalizer) {
|
|
372
393
|
return op;
|
373
394
|
};
|
374
395
|
}
|
375
|
-
/**
|
376
|
-
* Embed inputs from continuos pulling of a producer
|
377
|
-
*
|
378
|
-
* @tsplus pipeable fncts.io.Channel embedInput
|
379
|
-
*/
|
380
|
-
export function embedInput(input) {
|
381
|
-
return self => {
|
382
|
-
const op = new ChannelPrimitive(4 /* ChannelTag.Bridge */);
|
383
|
-
op.i0 = input;
|
384
|
-
op.i1 = self;
|
385
|
-
return op;
|
386
|
-
};
|
387
|
-
}
|
388
396
|
/**
|
389
397
|
* Halt a channel with the specified error
|
390
398
|
*
|
@@ -412,19 +420,19 @@ function failNow_1(error) {
|
|
412
420
|
* @tsplus getter fncts.io.Channel flatten
|
413
421
|
*/
|
414
422
|
function flatten_1(self) {
|
415
|
-
return
|
423
|
+
return tsplus_module_5.flatMap(identity)(self);
|
416
424
|
}
|
417
425
|
/**
|
418
426
|
* @tsplus static fncts.io.ChannelOps fromEither
|
419
427
|
*/
|
420
428
|
export function fromEither(either) {
|
421
|
-
return defer_1(() => tsplus_module_12.match(failNow_1,
|
429
|
+
return defer_1(() => tsplus_module_12.match(failNow_1, tsplus_module_5.succeedNow)(either()));
|
422
430
|
}
|
423
431
|
/**
|
424
432
|
* @tsplus static fncts.io.ChannelOps fromInput
|
425
433
|
*/
|
426
434
|
function fromInput_1(input) {
|
427
|
-
return unwrap_1(() => input.takeWith(
|
435
|
+
return unwrap_1(() => input.takeWith(tsplus_module_5.failCauseNow, elem => tsplus_module_5.zipRight(fromInput_1(input))(writeNow_1(elem)), tsplus_module_5.endNow));
|
428
436
|
}
|
429
437
|
/**
|
430
438
|
* Use an effect to end a channel
|
@@ -442,77 +450,48 @@ function fromIO_1(io) {
|
|
442
450
|
* @tsplus static fncts.io.ChannelOps fromOption
|
443
451
|
*/
|
444
452
|
export function fromOption(option) {
|
445
|
-
return defer_1(() => tsplus_module_17.match(() => failNow_1(tsplus_module_14.nothing(fileName_1 + ":
|
453
|
+
return defer_1(() => tsplus_module_17.match(() => failNow_1(tsplus_module_14.nothing(fileName_1 + ":662:68")), tsplus_module_5.succeedNow)(option()));
|
446
454
|
}
|
447
455
|
/**
|
448
456
|
* @tsplus static fncts.io.ChannelOps fromQueue
|
449
457
|
*/
|
450
458
|
function fromQueue_1(queue) {
|
451
|
-
return
|
452
|
-
}
|
453
|
-
/**
|
454
|
-
* Provides the channel with its required environment, which eliminates
|
455
|
-
* its dependency on `Env`.
|
456
|
-
*
|
457
|
-
* @tsplus pipeable fncts.io.Channel provideEnvironment
|
458
|
-
*/
|
459
|
-
function provideEnvironment_1(env) {
|
460
|
-
return self => {
|
461
|
-
return defer_1(() => {
|
462
|
-
const op = new ChannelPrimitive(14 /* ChannelTag.Provide */);
|
463
|
-
op.i0 = env();
|
464
|
-
op.i1 = self;
|
465
|
-
return op;
|
466
|
-
});
|
467
|
-
};
|
468
|
-
}
|
469
|
-
/**
|
470
|
-
* @tsplus pipeable fncts.io.Channel contramapEnvironment
|
471
|
-
*/
|
472
|
-
export function contramapEnvironment(f) {
|
473
|
-
return self => {
|
474
|
-
return tsplus_module_1.flatMap(env0 => provideEnvironment_1(() => f(env0))(self))(ask_1());
|
475
|
-
};
|
459
|
+
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")));
|
476
460
|
}
|
477
461
|
/**
|
478
462
|
* Halt a channel with the specified exception
|
479
463
|
*
|
480
|
-
* @tsplus static fncts.io.ChannelOps
|
464
|
+
* @tsplus static fncts.io.ChannelOps halt
|
481
465
|
*/
|
482
|
-
function
|
466
|
+
export function halt(defect) {
|
483
467
|
const op = new ChannelPrimitive(7 /* ChannelTag.Halt */);
|
484
|
-
op.i0 = () => tsplus_module_11.halt(defect);
|
468
|
+
op.i0 = () => tsplus_module_11.halt(defect());
|
485
469
|
return op;
|
486
470
|
}
|
487
471
|
/**
|
488
472
|
* Halt a channel with the specified exception
|
489
473
|
*
|
490
|
-
* @tsplus static fncts.io.ChannelOps
|
474
|
+
* @tsplus static fncts.io.ChannelOps haltNow
|
491
475
|
*/
|
492
|
-
|
476
|
+
function haltNow_1(defect) {
|
493
477
|
const op = new ChannelPrimitive(7 /* ChannelTag.Halt */);
|
494
|
-
op.i0 = () => tsplus_module_11.halt(defect
|
478
|
+
op.i0 = () => tsplus_module_11.halt(defect);
|
495
479
|
return op;
|
496
480
|
}
|
497
481
|
/**
|
498
482
|
* @tsplus static fncts.io.ChannelOps id
|
499
483
|
*/
|
500
484
|
function id_1() {
|
501
|
-
return readWith_1(_in =>
|
485
|
+
return readWith_1(_in => tsplus_module_5.zipRight(id_1())(write_1(() => _in)), failNow_1, tsplus_module_5.endNow);
|
502
486
|
}
|
503
487
|
/**
|
504
488
|
* @tsplus static fncts.io.ChannelOps interrupt
|
505
489
|
*/
|
506
490
|
export function interrupt(fiberId) {
|
507
|
-
return
|
491
|
+
return tsplus_module_5.failCauseNow(tsplus_module_11.interrupt(fiberId));
|
508
492
|
}
|
509
|
-
|
510
|
-
|
511
|
-
*
|
512
|
-
* @tsplus static fncts.io.ChannelOps scoped
|
513
|
-
*/
|
514
|
-
function scoped_1(io) {
|
515
|
-
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"));
|
493
|
+
function isChannelFailure(u) {
|
494
|
+
return tsplus_module_20.isObject(u) && ChannelFailureTypeId in u;
|
516
495
|
}
|
517
496
|
/**
|
518
497
|
* Returns a new channel, which is the same as this one, except the failure value of the returned
|
@@ -532,7 +511,7 @@ export function mapError(f) {
|
|
532
511
|
*/
|
533
512
|
function mapErrorCause_1(f) {
|
534
513
|
return self => {
|
535
|
-
return catchAllCause_1(cause =>
|
514
|
+
return catchAllCause_1(cause => tsplus_module_5.failCauseNow(f(cause)))(self);
|
536
515
|
};
|
537
516
|
}
|
538
517
|
/**
|
@@ -544,7 +523,7 @@ function mapErrorCause_1(f) {
|
|
544
523
|
*/
|
545
524
|
function mapIO_1(f) {
|
546
525
|
return self => {
|
547
|
-
return
|
526
|
+
return tsplus_module_5.flatMap(outDone => fromIO_1(() => f(outDone)))(self);
|
548
527
|
};
|
549
528
|
}
|
550
529
|
/**
|
@@ -554,11 +533,35 @@ function mapIO_1(f) {
|
|
554
533
|
*/
|
555
534
|
export function mapOut(f) {
|
556
535
|
return self => {
|
557
|
-
const reader = readWith_1(out =>
|
536
|
+
const reader = readWith_1(out => tsplus_module_5.zipRight(reader)(writeNow_1(f(out))), failNow_1, tsplus_module_5.endNow);
|
558
537
|
return pipeTo_1(reader)(self);
|
559
538
|
};
|
560
539
|
}
|
561
|
-
|
540
|
+
/**
|
541
|
+
* Provides the channel with its required environment, which eliminates
|
542
|
+
* its dependency on `Env`.
|
543
|
+
*
|
544
|
+
* @tsplus pipeable fncts.io.Channel provideEnvironment
|
545
|
+
*/
|
546
|
+
function provideEnvironment_1(env) {
|
547
|
+
return self => {
|
548
|
+
return defer_1(() => {
|
549
|
+
const op = new ChannelPrimitive(14 /* ChannelTag.Provide */);
|
550
|
+
op.i0 = env();
|
551
|
+
op.i1 = self;
|
552
|
+
return op;
|
553
|
+
});
|
554
|
+
};
|
555
|
+
}
|
556
|
+
/**
|
557
|
+
* Use a managed to emit an output element
|
558
|
+
*
|
559
|
+
* @tsplus static fncts.io.ChannelOps scoped
|
560
|
+
*/
|
561
|
+
function scoped_1(io) {
|
562
|
+
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"));
|
563
|
+
}
|
564
|
+
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);
|
562
565
|
/**
|
563
566
|
* @tsplus pipeable fncts.io.Channel mapOutIO
|
564
567
|
*/
|
@@ -590,10 +593,10 @@ function matchCauseChannel_1(onError, onSuccess) {
|
|
590
593
|
*/
|
591
594
|
export function matchChannel(onError, onSuccess) {
|
592
595
|
return channel => {
|
593
|
-
return matchCauseChannel_1(cause => tsplus_module_12.match(onError,
|
596
|
+
return matchCauseChannel_1(cause => tsplus_module_12.match(onError, tsplus_module_5.failCauseNow)(tsplus_module_11.failureOrCause(cause)), onSuccess)(channel);
|
594
597
|
};
|
595
598
|
}
|
596
|
-
export const never = /*#__PURE__*/fromIO_1(() =>
|
599
|
+
export const never = /*#__PURE__*/fromIO_1(() => tsplus_module_23.never);
|
597
600
|
/**
|
598
601
|
* Returns a new channel that will perform the operations of this one, until failure, and then
|
599
602
|
* it will switch over to the operations of the specified fallback channel.
|
@@ -643,36 +646,41 @@ class ChannelFailure {
|
|
643
646
|
}
|
644
647
|
}
|
645
648
|
_a = ChannelFailureTypeId;
|
646
|
-
function isChannelFailure(u) {
|
647
|
-
return tsplus_module_23.isObject(u) && ChannelFailureTypeId in u;
|
648
|
-
}
|
649
649
|
/**
|
650
650
|
* @tsplus pipeable fncts.io.Channel pipeToOrFail
|
651
651
|
* @tsplus pipeable-operator fncts.io.Channel >>>
|
652
652
|
*/
|
653
653
|
export function pipeToOrFail(right) {
|
654
654
|
return left => {
|
655
|
-
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 =>
|
655
|
+
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)));
|
656
656
|
};
|
657
657
|
}
|
658
658
|
/**
|
659
659
|
* @tsplus static fncts.io.ChannelOps read
|
660
660
|
*/
|
661
661
|
export function read() {
|
662
|
-
return readOrFail_1(tsplus_module_14.nothing(fileName_1 + ":
|
662
|
+
return readOrFail_1(tsplus_module_14.nothing(fileName_1 + ":1027:36"));
|
663
663
|
}
|
664
664
|
/**
|
665
665
|
* @tsplus static fncts.io.ChannelOps readOrFail
|
666
666
|
*/
|
667
667
|
function readOrFail_1(e) {
|
668
668
|
const op = new ChannelPrimitive(5 /* ChannelTag.Read */);
|
669
|
-
op.i0 =
|
669
|
+
op.i0 = tsplus_module_5.endNow;
|
670
670
|
const continuation = new ChannelPrimitive(1 /* ChannelTag.ContinuationK */);
|
671
671
|
continuation.i0 = () => failNow_1(e);
|
672
672
|
continuation.i1 = () => failNow_1(e);
|
673
673
|
op.i1 = continuation;
|
674
674
|
return op;
|
675
675
|
}
|
676
|
+
/**
|
677
|
+
* Reads an input and continue exposing both error and completion
|
678
|
+
*
|
679
|
+
* @tsplus static fncts.io.ChannelOps readWith
|
680
|
+
*/
|
681
|
+
function readWith_1(inp, error, done) {
|
682
|
+
return readWithCause_1(inp, c => tsplus_module_12.match(error, tsplus_module_5.failCauseNow)(tsplus_module_11.failureOrCause(c)), done);
|
683
|
+
}
|
676
684
|
/**
|
677
685
|
* Reads an input and continue exposing both full error cause and completion
|
678
686
|
*
|
@@ -687,21 +695,13 @@ function readWithCause_1(inp, halt, done) {
|
|
687
695
|
op.i1 = continuation;
|
688
696
|
return op;
|
689
697
|
}
|
690
|
-
/**
|
691
|
-
* Reads an input and continue exposing both error and completion
|
692
|
-
*
|
693
|
-
* @tsplus static fncts.io.ChannelOps readWith
|
694
|
-
*/
|
695
|
-
function readWith_1(inp, error, done) {
|
696
|
-
return readWithCause_1(inp, c => tsplus_module_12.match(error, tsplus_module_1.failCauseNow)(tsplus_module_11.failureOrCause(c)), done);
|
697
|
-
}
|
698
698
|
/**
|
699
699
|
* Repeats this channel forever
|
700
700
|
*
|
701
701
|
* @tsplus getter fncts.io.Channel repeated
|
702
702
|
*/
|
703
703
|
function repeated_1(self) {
|
704
|
-
return
|
704
|
+
return tsplus_module_5.flatMap(() => repeated_1(self))(self);
|
705
705
|
}
|
706
706
|
/**
|
707
707
|
* @tsplus static fncts.io.ChannelOps toQueue
|
@@ -709,7 +709,7 @@ function repeated_1(self) {
|
|
709
709
|
function toQueue_1(queue) {
|
710
710
|
return defer_1(() => {
|
711
711
|
function toQueue(queue) {
|
712
|
-
return readWithCause_1(inp =>
|
712
|
+
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)));
|
713
713
|
}
|
714
714
|
return toQueue(queue());
|
715
715
|
});
|
@@ -730,16 +730,16 @@ function write_1(out) {
|
|
730
730
|
export function writeAll(outs) {
|
731
731
|
return writeChunk_1(tsplus_module_25.from(outs));
|
732
732
|
}
|
733
|
-
function writeChunkWriter(outs, idx, len) {
|
734
|
-
if (idx === len) return unit_1;
|
735
|
-
return tsplus_module_1.zipRight(writeChunkWriter(outs, idx + 1, len))(writeNow_1(tsplus_module_10.unsafeGet(idx)(outs)));
|
736
|
-
}
|
737
733
|
/**
|
738
734
|
* @tsplus static fncts.io.ChannelOps writeChunk
|
739
735
|
*/
|
740
736
|
function writeChunk_1(outs) {
|
741
737
|
return writeChunkWriter(outs, 0, outs.length);
|
742
738
|
}
|
739
|
+
function writeChunkWriter(outs, idx, len) {
|
740
|
+
if (idx === len) return unit_1;
|
741
|
+
return tsplus_module_5.zipRight(writeChunkWriter(outs, idx + 1, len))(writeNow_1(tsplus_module_10.unsafeGet(idx)(outs)));
|
742
|
+
}
|
743
743
|
/**
|
744
744
|
* Writes an output to the channel
|
745
745
|
*
|
@@ -753,8 +753,20 @@ function writeNow_1(out) {
|
|
753
753
|
/**
|
754
754
|
* @tsplus static fncts.io.ChannelOps unit
|
755
755
|
*/
|
756
|
-
const unit_1 = /*#__PURE__*/
|
756
|
+
const unit_1 = /*#__PURE__*/tsplus_module_5.endNow(undefined);
|
757
757
|
export const unit = unit_1;
|
758
|
+
/**
|
759
|
+
* @tsplus static fncts.io.ChannelOps fromHubScoped
|
760
|
+
*/
|
761
|
+
export function fromHubScoped(hub) {
|
762
|
+
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");
|
763
|
+
}
|
764
|
+
/**
|
765
|
+
* @tsplus static fncts.io.ChannelOps toHub
|
766
|
+
*/
|
767
|
+
export function toHub(hub) {
|
768
|
+
return toQueue_1(hub);
|
769
|
+
}
|
758
770
|
/**
|
759
771
|
* Makes a channel from an effect that returns a channel in case of success
|
760
772
|
*
|
@@ -771,16 +783,4 @@ function unwrap_1(self) {
|
|
771
783
|
export function unwrapScoped(self) {
|
772
784
|
return concatAllWith_1((d, _) => d, (d, _) => d)(scoped_1(self));
|
773
785
|
}
|
774
|
-
/**
|
775
|
-
* @tsplus static fncts.io.ChannelOps fromHubScoped
|
776
|
-
*/
|
777
|
-
export function fromHubScoped(hub) {
|
778
|
-
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");
|
779
|
-
}
|
780
|
-
/**
|
781
|
-
* @tsplus static fncts.io.ChannelOps toHub
|
782
|
-
*/
|
783
|
-
export function toHub(hub) {
|
784
|
-
return toQueue_1(hub);
|
785
|
-
}
|
786
786
|
//# sourceMappingURL=api.mjs.map
|