@fncts/io 0.0.32 → 0.0.33
Sign up to get free protection for your applications and to get access to all the features.
- package/Fiber/FiberRuntime.d.ts +3 -3
- package/IO/api.d.ts +2 -1
- package/IO/definition.d.ts +34 -24
- package/IO/runtime.d.ts +7 -17
- package/STM/definition.d.ts +1 -1
- package/Stream/api.d.ts +89 -1
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs +1 -1
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +3 -3
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +4 -4
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api/toPull.cjs +2 -2
- package/_cjs/Channel/api/toPull.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +6 -6
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/internal/ChannelExecutor.cjs +10 -10
- package/_cjs/Channel/internal/ChannelExecutor.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +3 -3
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Clock/live.cjs +1 -1
- package/_cjs/Clock/live.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +78 -47
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/api/collectAll.cjs +1 -1
- package/_cjs/Fiber/api/collectAll.cjs.map +1 -1
- package/_cjs/Fiber/api/mapIO.cjs +1 -1
- package/_cjs/Fiber/api/mapIO.cjs.map +1 -1
- package/_cjs/Fiber/api/zipWith.cjs +1 -1
- package/_cjs/Fiber/api/zipWith.cjs.map +1 -1
- package/_cjs/Fiber/constructors.cjs +5 -5
- package/_cjs/Fiber/constructors.cjs.map +1 -1
- package/_cjs/FiberRef/unsafe.cjs +3 -2
- package/_cjs/FiberRef/unsafe.cjs.map +1 -1
- package/_cjs/Future/api.cjs +4 -4
- package/_cjs/Future/api.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +1 -1
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/asyncIO.cjs +1 -1
- package/_cjs/IO/api/asyncIO.cjs.map +1 -1
- package/_cjs/IO/api/asyncInterrupt.cjs +2 -2
- package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
- package/_cjs/IO/api/concurrency.cjs +3 -3
- package/_cjs/IO/api/concurrency.cjs.map +1 -1
- package/_cjs/IO/api/daemonChildren.cjs +1 -1
- package/_cjs/IO/api/daemonChildren.cjs.map +1 -1
- package/_cjs/IO/api/fork.cjs +2 -1
- package/_cjs/IO/api/fork.cjs.map +1 -1
- package/_cjs/IO/api/interrupt.cjs +2 -2
- package/_cjs/IO/api/interrupt.cjs.map +1 -1
- package/_cjs/IO/api/repeat.cjs +2 -2
- package/_cjs/IO/api/repeat.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +1 -1
- package/_cjs/IO/api/timeout.cjs.map +1 -1
- package/_cjs/IO/api/transplant.cjs +1 -1
- package/_cjs/IO/api/transplant.cjs.map +1 -1
- package/_cjs/IO/api/withEarlyRelease.cjs +1 -1
- package/_cjs/IO/api/withEarlyRelease.cjs.map +1 -1
- package/_cjs/IO/api.cjs +33 -32
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +17 -31
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +45 -38
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/Logger/api.cjs +3 -2
- package/_cjs/Logger/api.cjs.map +1 -1
- package/_cjs/MVar/api.cjs +11 -11
- package/_cjs/MVar/api.cjs.map +1 -1
- package/_cjs/Push/api.cjs +3 -3
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Push/internal.cjs +1 -1
- package/_cjs/Push/internal.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +2 -2
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs +4 -4
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs +5 -5
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/Ref/Synchronized/api.cjs +3 -3
- package/_cjs/Ref/Synchronized/api.cjs.map +1 -1
- package/_cjs/Ref/api/collect.cjs +1 -1
- package/_cjs/Ref/api/collect.cjs.map +1 -1
- package/_cjs/Ref/api/dimap.cjs +3 -3
- package/_cjs/Ref/api/dimap.cjs.map +1 -1
- package/_cjs/Ref/api/filter.cjs +2 -2
- package/_cjs/Ref/api/filter.cjs.map +1 -1
- package/_cjs/Ref/api.cjs +2 -3
- package/_cjs/Ref/api.cjs.map +1 -1
- package/_cjs/RefSubject/Atomic.cjs +6 -6
- package/_cjs/RefSubject/Atomic.cjs.map +1 -1
- package/_cjs/STM/api.cjs +5 -5
- package/_cjs/STM/api.cjs.map +1 -1
- package/_cjs/STM/definition.cjs +1 -1
- package/_cjs/STM/definition.cjs.map +1 -1
- package/_cjs/STM/internal/CommitState.cjs +5 -4
- package/_cjs/STM/internal/CommitState.cjs.map +1 -1
- package/_cjs/STM/internal/Journal.cjs +8 -8
- package/_cjs/STM/internal/Journal.cjs.map +1 -1
- package/_cjs/Schedule/api/driver.cjs +3 -3
- package/_cjs/Schedule/api/driver.cjs.map +1 -1
- package/_cjs/Schedule/api.cjs +8 -8
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs +1 -1
- package/_cjs/Scope/ReleaseMap/api/releaseAll.cjs.map +1 -1
- package/_cjs/Scope/ReleaseMap/api.cjs +3 -3
- package/_cjs/Scope/ReleaseMap/api.cjs.map +1 -1
- package/_cjs/ScopedRef/api.cjs +1 -1
- package/_cjs/ScopedRef/api.cjs.map +1 -1
- package/_cjs/Semaphore.cjs +2 -2
- package/_cjs/Semaphore.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +6 -6
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +8 -8
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +6 -6
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +370 -130
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/Stream/internal/Handoff.cjs +2 -2
- package/_cjs/Stream/internal/Handoff.cjs.map +1 -1
- package/_cjs/Stream/internal/Pull.cjs +2 -2
- package/_cjs/Stream/internal/Pull.cjs.map +1 -1
- package/_cjs/Stream/internal/Take.cjs +6 -6
- package/_cjs/Stream/internal/Take.cjs.map +1 -1
- package/_cjs/Stream/internal/util.cjs +3 -2
- package/_cjs/Stream/internal/util.cjs.map +1 -1
- package/_cjs/TFuture/api.cjs +3 -3
- package/_cjs/TFuture/api.cjs.map +1 -1
- package/_cjs/TFuture/constructors.cjs +1 -1
- package/_cjs/TFuture/constructors.cjs.map +1 -1
- package/_cjs/TRef/definition.cjs +9 -9
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/findIO.cjs +3 -3
- package/_cjs/collection/immutable/Conc/findIO.cjs.map +1 -1
- package/_cjs/data/Exit/foreachIO.cjs +1 -1
- package/_cjs/data/Exit/foreachIO.cjs.map +1 -1
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs +1 -1
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs.map +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +3 -3
- package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
- package/_mjs/Channel/api/mergeWith.mjs +4 -4
- package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
- package/_mjs/Channel/api/toPull.mjs +2 -2
- package/_mjs/Channel/api/toPull.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +6 -6
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/internal/ChannelExecutor.mjs +10 -10
- package/_mjs/Channel/internal/ChannelExecutor.mjs.map +1 -1
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +3 -3
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
- package/_mjs/Clock/live.mjs +1 -1
- package/_mjs/Clock/live.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +78 -47
- 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/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 +5 -5
- package/_mjs/Fiber/constructors.mjs.map +1 -1
- package/_mjs/FiberRef/unsafe.mjs +3 -2
- package/_mjs/FiberRef/unsafe.mjs.map +1 -1
- package/_mjs/Future/api.mjs +4 -4
- package/_mjs/Future/api.mjs.map +1 -1
- package/_mjs/Hub/internal.mjs +1 -1
- package/_mjs/Hub/internal.mjs.map +1 -1
- package/_mjs/IO/api/asyncIO.mjs +1 -1
- package/_mjs/IO/api/asyncIO.mjs.map +1 -1
- package/_mjs/IO/api/asyncInterrupt.mjs +2 -2
- package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
- package/_mjs/IO/api/concurrency.mjs +3 -3
- package/_mjs/IO/api/concurrency.mjs.map +1 -1
- package/_mjs/IO/api/daemonChildren.mjs +1 -1
- package/_mjs/IO/api/daemonChildren.mjs.map +1 -1
- package/_mjs/IO/api/fork.mjs +2 -1
- package/_mjs/IO/api/fork.mjs.map +1 -1
- package/_mjs/IO/api/interrupt.mjs +2 -2
- package/_mjs/IO/api/interrupt.mjs.map +1 -1
- package/_mjs/IO/api/repeat.mjs +2 -2
- package/_mjs/IO/api/repeat.mjs.map +1 -1
- package/_mjs/IO/api/timeout.mjs +1 -1
- package/_mjs/IO/api/timeout.mjs.map +1 -1
- package/_mjs/IO/api/transplant.mjs +1 -1
- package/_mjs/IO/api/transplant.mjs.map +1 -1
- package/_mjs/IO/api/withEarlyRelease.mjs +1 -1
- package/_mjs/IO/api/withEarlyRelease.mjs.map +1 -1
- package/_mjs/IO/api.mjs +32 -30
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +16 -27
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +42 -33
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/Logger/api.mjs +3 -2
- package/_mjs/Logger/api.mjs.map +1 -1
- package/_mjs/MVar/api.mjs +11 -11
- package/_mjs/MVar/api.mjs.map +1 -1
- package/_mjs/Push/api.mjs +3 -3
- package/_mjs/Push/api.mjs.map +1 -1
- package/_mjs/Push/internal.mjs +1 -1
- package/_mjs/Push/internal.mjs.map +1 -1
- package/_mjs/Queue/api/filterInputIO.mjs +2 -2
- package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
- package/_mjs/Ref/Derived.mjs +4 -4
- package/_mjs/Ref/Derived.mjs.map +1 -1
- package/_mjs/Ref/DerivedAll.mjs +5 -5
- package/_mjs/Ref/DerivedAll.mjs.map +1 -1
- package/_mjs/Ref/Synchronized/api.mjs +3 -3
- package/_mjs/Ref/Synchronized/api.mjs.map +1 -1
- package/_mjs/Ref/api/collect.mjs +1 -1
- package/_mjs/Ref/api/collect.mjs.map +1 -1
- package/_mjs/Ref/api/dimap.mjs +3 -3
- package/_mjs/Ref/api/dimap.mjs.map +1 -1
- package/_mjs/Ref/api/filter.mjs +2 -2
- package/_mjs/Ref/api/filter.mjs.map +1 -1
- package/_mjs/Ref/api.mjs +2 -1
- package/_mjs/Ref/api.mjs.map +1 -1
- package/_mjs/RefSubject/Atomic.mjs +6 -6
- package/_mjs/RefSubject/Atomic.mjs.map +1 -1
- package/_mjs/STM/api.mjs +5 -5
- package/_mjs/STM/api.mjs.map +1 -1
- package/_mjs/STM/definition.mjs +1 -1
- package/_mjs/STM/definition.mjs.map +1 -1
- package/_mjs/STM/internal/CommitState.mjs +5 -4
- package/_mjs/STM/internal/CommitState.mjs.map +1 -1
- package/_mjs/STM/internal/Journal.mjs +8 -8
- package/_mjs/STM/internal/Journal.mjs.map +1 -1
- package/_mjs/Schedule/api/driver.mjs +3 -3
- package/_mjs/Schedule/api/driver.mjs.map +1 -1
- package/_mjs/Schedule/api.mjs +8 -8
- package/_mjs/Schedule/api.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs +1 -1
- package/_mjs/Scope/ReleaseMap/api/releaseAll.mjs.map +1 -1
- package/_mjs/Scope/ReleaseMap/api.mjs +3 -3
- package/_mjs/Scope/ReleaseMap/api.mjs.map +1 -1
- package/_mjs/ScopedRef/api.mjs +1 -1
- package/_mjs/ScopedRef/api.mjs.map +1 -1
- package/_mjs/Semaphore.mjs +2 -2
- package/_mjs/Semaphore.mjs.map +1 -1
- package/_mjs/Sink/api.mjs +6 -6
- package/_mjs/Sink/api.mjs.map +1 -1
- package/_mjs/Stream/api/zipAllWith.mjs +8 -8
- package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
- package/_mjs/Stream/api/zipWithChunks.mjs +6 -6
- package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +281 -58
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/Stream/internal/Handoff.mjs +2 -2
- package/_mjs/Stream/internal/Handoff.mjs.map +1 -1
- package/_mjs/Stream/internal/Pull.mjs +2 -2
- package/_mjs/Stream/internal/Pull.mjs.map +1 -1
- package/_mjs/Stream/internal/Take.mjs +6 -6
- package/_mjs/Stream/internal/Take.mjs.map +1 -1
- package/_mjs/Stream/internal/util.mjs +3 -2
- package/_mjs/Stream/internal/util.mjs.map +1 -1
- package/_mjs/TFuture/api.mjs +3 -3
- package/_mjs/TFuture/api.mjs.map +1 -1
- package/_mjs/TFuture/constructors.mjs +1 -1
- package/_mjs/TFuture/constructors.mjs.map +1 -1
- package/_mjs/TRef/definition.mjs +9 -9
- package/_mjs/TRef/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/findIO.mjs +3 -3
- package/_mjs/collection/immutable/Conc/findIO.mjs.map +1 -1
- package/_mjs/data/Exit/foreachIO.mjs +1 -1
- package/_mjs/data/Exit/foreachIO.mjs.map +1 -1
- package/_src/Fiber/FiberRuntime.ts +39 -16
- package/_src/IO/api/asyncIO.ts +1 -1
- package/_src/IO/api.ts +4 -3
- package/_src/IO/definition.ts +35 -28
- package/_src/IO/runtime.ts +36 -35
- package/_src/RefSubject/Atomic.ts +4 -4
- package/_src/STM/definition.ts +1 -1
- package/_src/Stream/api.ts +258 -8
- package/package.json +2 -2
package/Fiber/FiberRuntime.d.ts
CHANGED
@@ -11,7 +11,7 @@ import { Cause } from "@fncts/base/data/Cause/definition";
|
|
11
11
|
import { Supervisor } from "@fncts/io/Supervisor/definition";
|
12
12
|
import { FiberRef } from "@fncts/io/FiberRef/definition";
|
13
13
|
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
14
|
-
import { IllegalStateError, isInterruptedException } from "@fncts/base/data/exceptions";
|
14
|
+
import { IllegalStateError, NoSuchElementError, isInterruptedException } from "@fncts/base/data/exceptions";
|
15
15
|
import { TraceElement } from "@fncts/base/data/TraceElement/definition";
|
16
16
|
import { FiberScope } from "@fncts/io/FiberScope";
|
17
17
|
import { LogLevel } from "@fncts/io/LogLevel";
|
@@ -27,12 +27,12 @@ import { FiberMessage } from "./FiberMessage.js";
|
|
27
27
|
export declare class RevertFlags {
|
28
28
|
readonly patch: RuntimeFlags.Patch;
|
29
29
|
readonly trace?: string | undefined;
|
30
|
-
readonly
|
30
|
+
readonly _tag = IOOpCode.RevertFlags;
|
31
31
|
constructor(patch: RuntimeFlags.Patch, trace?: string | undefined);
|
32
32
|
}
|
33
33
|
export declare class UpdateTrace {
|
34
34
|
readonly trace?: string | undefined;
|
35
|
-
readonly
|
35
|
+
readonly _tag = IOOpCode.UpdateTrace;
|
36
36
|
constructor(trace?: string | undefined);
|
37
37
|
}
|
38
38
|
export type Continuation = OnSuccess<any, any, any, any, any, any> | OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | WhileLoop<any, any, any> | UpdateTrace | RevertFlags;
|
package/IO/api.d.ts
CHANGED
@@ -11,6 +11,7 @@ import { Predicate } from "@fncts/base/data/Predicate/definition";
|
|
11
11
|
import { NonEmptyArray } from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition";
|
12
12
|
import { Eval } from "@fncts/base/control/Eval/definition";
|
13
13
|
import { Exit } from "@fncts/base/data/Exit/definition";
|
14
|
+
import { NoSuchElementError } from "@fncts/base/data/exceptions";
|
14
15
|
import { Trace } from "@fncts/base/data/Trace/definition";
|
15
16
|
import { List } from "@fncts/base/collection/immutable/List/definition";
|
16
17
|
import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
|
@@ -427,7 +428,7 @@ export declare function fromMaybe<A>(maybe: Lazy<Maybe<A>>, __tsplusTrace?: stri
|
|
427
428
|
* @tsplus getter fncts.Maybe toIO
|
428
429
|
* @tsplus location "@fncts/io/IO/api"
|
429
430
|
*/
|
430
|
-
export declare function fromMaybeNow<A = never>(maybe: Maybe<A>, __tsplusTrace?: string): IO<
|
431
|
+
export declare function fromMaybeNow<A = never>(maybe: Maybe<A>, __tsplusTrace?: string): IO<never, NoSuchElementError, A>;
|
431
432
|
/**
|
432
433
|
* Create an IO that when executed will construct `promise` and wait for its result,
|
433
434
|
* errors will be handled using `onReject`
|
package/IO/definition.d.ts
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
+
import { NoSuchElementError } from "@fncts/base/data/exceptions";
|
2
3
|
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
3
4
|
import { Cause } from "@fncts/base/data/Cause/definition";
|
4
5
|
import { Lazy } from "@fncts/base/data/function/definition";
|
5
6
|
import { STM } from "@fncts/io/STM/definition";
|
7
|
+
import { Nothing, Just } from "@fncts/base/data/Maybe/definition";
|
6
8
|
import type { FiberRuntime } from "../Fiber/FiberRuntime.js";
|
7
9
|
import type { Running } from "../FiberStatus.js";
|
8
10
|
import type { RuntimeFlagsPatch } from "../RuntimeFlags.js";
|
11
|
+
import type { Left, Right } from "@fncts/base/data/Either";
|
12
|
+
import type { Failure, Success } from "@fncts/base/data/Exit";
|
9
13
|
import type { Trace } from "@fncts/base/data/Trace";
|
10
14
|
import { RuntimeFlags } from "../RuntimeFlags.js";
|
11
15
|
export declare const IOVariance: unique symbol;
|
@@ -32,6 +36,20 @@ export declare abstract class IO<R, E, A> {
|
|
32
36
|
_A: () => A;
|
33
37
|
};
|
34
38
|
}
|
39
|
+
declare module "@fncts/base/data/Either/definition" {
|
40
|
+
interface Either<E, A> extends IO<never, E, A> {
|
41
|
+
}
|
42
|
+
}
|
43
|
+
declare module "@fncts/base/data/Maybe/definition" {
|
44
|
+
interface Maybe<A> extends IO<never, NoSuchElementError, A> {
|
45
|
+
}
|
46
|
+
}
|
47
|
+
declare module "@fncts/base/data/Exit/definition" {
|
48
|
+
interface Success<A> extends IO<never, never, A> {
|
49
|
+
}
|
50
|
+
interface Failure<E> extends IO<never, E, never> {
|
51
|
+
}
|
52
|
+
}
|
35
53
|
/**
|
36
54
|
* @tsplus type fncts.io.IOAspects
|
37
55
|
*/
|
@@ -89,14 +107,14 @@ export declare function isIO(u: unknown): u is IO<any, any, any>;
|
|
89
107
|
export declare class Sync<A> extends IO<never, never, A> {
|
90
108
|
readonly evaluate: () => A;
|
91
109
|
readonly trace?: string | undefined;
|
92
|
-
readonly
|
110
|
+
readonly _tag = IOOpCode.Sync;
|
93
111
|
constructor(evaluate: () => A, trace?: string | undefined);
|
94
112
|
}
|
95
113
|
export declare class Async<R, E, A> extends IO<R, E, A> {
|
96
114
|
readonly registerCallback: (f: (_: IO<R, E, A>) => void) => any;
|
97
115
|
readonly blockingOn: () => FiberId;
|
98
116
|
readonly trace?: string | undefined;
|
99
|
-
readonly
|
117
|
+
readonly _tag = IOOpCode.Async;
|
100
118
|
constructor(registerCallback: (f: (_: IO<R, E, A>) => void) => any, blockingOn: () => FiberId, trace?: string | undefined);
|
101
119
|
}
|
102
120
|
/**
|
@@ -107,7 +125,7 @@ export declare class OnSuccessAndFailure<R, E, A, R1, E1, B, R2, E2, C> extends
|
|
107
125
|
readonly failureK: (cause: Cause<E>) => IO<R1, E1, B>;
|
108
126
|
readonly successK: (a: A) => IO<R2, E2, C>;
|
109
127
|
readonly trace?: string | undefined;
|
110
|
-
readonly
|
128
|
+
readonly _tag = IOOpCode.OnSuccessAndFailure;
|
111
129
|
constructor(first: IO<R, E, A>, failureK: (cause: Cause<E>) => IO<R1, E1, B>, successK: (a: A) => IO<R2, E2, C>, trace?: string | undefined);
|
112
130
|
onFailure(c: Cause<E>): IO<R | R1 | R2, E1 | E2, B | C>;
|
113
131
|
onSuccess(a: A): IO<R | R1 | R2, E1 | E2, B | C>;
|
@@ -116,7 +134,7 @@ export declare class OnFailure<R, E, A, R1, E1, B> extends IO<R | R1, E1, A | B>
|
|
116
134
|
readonly first: IO<R, E, A>;
|
117
135
|
readonly failureK: (cause: Cause<E>) => IO<R1, E1, B>;
|
118
136
|
readonly trace?: string | undefined;
|
119
|
-
readonly
|
137
|
+
readonly _tag = IOOpCode.OnFailure;
|
120
138
|
constructor(first: IO<R, E, A>, failureK: (cause: Cause<E>) => IO<R1, E1, B>, trace?: string | undefined);
|
121
139
|
onFailure(c: Cause<E>): IO<R | R1, E1, A | B>;
|
122
140
|
onSuccess(a: A): IO<R | R1, E1, A | B>;
|
@@ -128,7 +146,7 @@ export declare class OnSuccess<R, R1, E, E1, A, A1> extends IO<R | R1, E | E1, A
|
|
128
146
|
readonly first: IO<R, E, A>;
|
129
147
|
readonly successK: (a: A) => IO<R1, E1, A1>;
|
130
148
|
readonly trace?: string | undefined;
|
131
|
-
readonly
|
149
|
+
readonly _tag = IOOpCode.OnSuccess;
|
132
150
|
constructor(first: IO<R, E, A>, successK: (a: A) => IO<R1, E1, A1>, trace?: string | undefined);
|
133
151
|
onFailure(c: Cause<E>): IO<R | R1, E | E1, A1>;
|
134
152
|
onSuccess(a: A): IO<R | R1, E | E1, A1>;
|
@@ -139,19 +157,19 @@ export declare class OnSuccess<R, R1, E, E1, A, A1> extends IO<R | R1, E | E1, A
|
|
139
157
|
export declare class SucceedNow<A> extends IO<never, never, A> {
|
140
158
|
readonly value: A;
|
141
159
|
readonly trace?: string | undefined;
|
142
|
-
readonly
|
160
|
+
readonly _tag = IOOpCode.SucceedNow;
|
143
161
|
constructor(value: A, trace?: string | undefined);
|
144
162
|
}
|
145
163
|
export declare class UpdateRuntimeFlags extends IO<never, never, void> {
|
146
164
|
readonly update: RuntimeFlags.Patch;
|
147
165
|
readonly trace?: string | undefined;
|
148
|
-
readonly
|
166
|
+
readonly _tag = IOOpCode.UpdateRuntimeFlags;
|
149
167
|
constructor(update: RuntimeFlags.Patch, trace?: string | undefined);
|
150
168
|
}
|
151
169
|
export declare class Interruptible<R, E, A> extends IO<R, E, A> {
|
152
170
|
readonly effect: IO<R, E, A>;
|
153
171
|
readonly trace?: string | undefined;
|
154
|
-
readonly
|
172
|
+
readonly _tag = IOOpCode.UpdateRuntimeFlagsWithin;
|
155
173
|
constructor(effect: IO<R, E, A>, trace?: string | undefined);
|
156
174
|
readonly update: RuntimeFlags.Patch;
|
157
175
|
scope(oldRuntimeFlags: RuntimeFlags): IO<R, E, A>;
|
@@ -159,7 +177,7 @@ export declare class Interruptible<R, E, A> extends IO<R, E, A> {
|
|
159
177
|
export declare class Uninterruptible<R, E, A> extends IO<R, E, A> {
|
160
178
|
readonly effect: IO<R, E, A>;
|
161
179
|
readonly trace?: string | undefined;
|
162
|
-
readonly
|
180
|
+
readonly _tag = IOOpCode.UpdateRuntimeFlagsWithin;
|
163
181
|
constructor(effect: IO<R, E, A>, trace?: string | undefined);
|
164
182
|
readonly update: RuntimeFlags.Patch;
|
165
183
|
scope(oldRuntimeFlags: RuntimeFlags): IO<R, E, A>;
|
@@ -168,19 +186,19 @@ export declare class Dynamic<R, E, A> extends IO<R, E, A> {
|
|
168
186
|
readonly update: RuntimeFlagsPatch;
|
169
187
|
readonly f: (oldRuntimeFlags: RuntimeFlags) => IO<R, E, A>;
|
170
188
|
readonly trace?: string | undefined;
|
171
|
-
readonly
|
189
|
+
readonly _tag = IOOpCode.UpdateRuntimeFlagsWithin;
|
172
190
|
constructor(update: RuntimeFlagsPatch, f: (oldRuntimeFlags: RuntimeFlags) => IO<R, E, A>, trace?: string | undefined);
|
173
191
|
scope(oldRuntimeFlags: RuntimeFlags): IO<R, E, A>;
|
174
192
|
}
|
175
193
|
export declare class GenerateStackTrace extends IO<never, never, Trace> {
|
176
194
|
readonly trace?: string | undefined;
|
177
|
-
readonly
|
195
|
+
readonly _tag = IOOpCode.GenerateStackTrace;
|
178
196
|
constructor(trace?: string | undefined);
|
179
197
|
}
|
180
198
|
export declare class Stateful<R, E, A> extends IO<R, E, A> {
|
181
199
|
readonly onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>;
|
182
200
|
readonly trace?: string | undefined;
|
183
|
-
readonly
|
201
|
+
readonly _tag = IOOpCode.Stateful;
|
184
202
|
constructor(onState: (fiber: FiberRuntime<E, A>, status: Running) => IO<R, E, A>, trace?: string | undefined);
|
185
203
|
}
|
186
204
|
export declare class WhileLoop<R, E, A> extends IO<R, E, void> {
|
@@ -188,12 +206,12 @@ export declare class WhileLoop<R, E, A> extends IO<R, E, void> {
|
|
188
206
|
readonly body: () => IO<R, E, A>;
|
189
207
|
readonly process: (a: A) => any;
|
190
208
|
readonly trace?: string | undefined;
|
191
|
-
readonly
|
209
|
+
readonly _tag = IOOpCode.WhileLoop;
|
192
210
|
constructor(check: () => boolean, body: () => IO<R, E, A>, process: (a: A) => any, trace?: string | undefined);
|
193
211
|
}
|
194
212
|
export declare class YieldNow extends IO<never, never, void> {
|
195
213
|
readonly trace?: string | undefined;
|
196
|
-
readonly
|
214
|
+
readonly _tag = IOOpCode.YieldNow;
|
197
215
|
constructor(trace?: string | undefined);
|
198
216
|
}
|
199
217
|
/**
|
@@ -202,10 +220,10 @@ export declare class YieldNow extends IO<never, never, void> {
|
|
202
220
|
export declare class Fail<E> extends IO<never, E, never> {
|
203
221
|
readonly cause: Lazy<Cause<E>>;
|
204
222
|
readonly trace?: string | undefined;
|
205
|
-
readonly
|
223
|
+
readonly _tag = IOOpCode.Fail;
|
206
224
|
constructor(cause: Lazy<Cause<E>>, trace?: string | undefined);
|
207
225
|
}
|
208
|
-
export type Concrete = OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | OnSuccess<any, any, any, any, any, any> | UpdateRuntimeFlagsWithin | Sync<any> | Async<any, any, any> | SucceedNow<any> | UpdateRuntimeFlags | GenerateStackTrace | Stateful<any, any, any> | WhileLoop<any, any, any> | YieldNow | Fail<any> | STM<any, any, any>;
|
226
|
+
export type Concrete = OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | OnSuccess<any, any, any, any, any, any> | UpdateRuntimeFlagsWithin | Sync<any> | Async<any, any, any> | SucceedNow<any> | UpdateRuntimeFlags | GenerateStackTrace | Stateful<any, any, any> | WhileLoop<any, any, any> | YieldNow | Fail<any> | STM<any, any, any> | Left<any> | Right<any> | Nothing | Just<any> | Failure<any> | Success<any>;
|
209
227
|
/**
|
210
228
|
* @tsplus static fncts.io.IOOps concrete
|
211
229
|
* @tsplus macro identity
|
@@ -215,11 +233,3 @@ export declare function concrete(io: IO<any, any, any>): Concrete;
|
|
215
233
|
export type EvaluationStep = OnSuccessAndFailure<any, any, any, any, any, any, any, any, any> | OnFailure<any, any, any, any, any, any> | OnSuccess<any, any, any, any, any, any>;
|
216
234
|
export type UpdateRuntimeFlagsWithin = Interruptible<any, any, any> | Uninterruptible<any, any, any> | Dynamic<any, any, any>;
|
217
235
|
export type Canceler<R> = URIO<R, void>;
|
218
|
-
export declare const IOErrorTypeId: unique symbol;
|
219
|
-
export type IOErrorTypeId = typeof IOErrorTypeId;
|
220
|
-
export declare class IOError<E> {
|
221
|
-
readonly cause: Cause<E>;
|
222
|
-
readonly [IOErrorTypeId]: IOErrorTypeId;
|
223
|
-
constructor(cause: Cause<E>);
|
224
|
-
}
|
225
|
-
export declare function isIOError(u: unknown): u is IOError<unknown>;
|
package/IO/runtime.d.ts
CHANGED
@@ -16,12 +16,12 @@ export declare class Runtime<R> {
|
|
16
16
|
readonly runtimeFlags: RuntimeFlags;
|
17
17
|
readonly fiberRefs: FiberRefs;
|
18
18
|
constructor(environment: Environment<R>, runtimeFlags: RuntimeFlags, fiberRefs: FiberRefs);
|
19
|
+
makeFiber: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => FiberRuntime<E, A>;
|
19
20
|
unsafeRunFiber: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => FiberRuntime<E, A>;
|
20
|
-
unsafeRunWith: <E, A>(io: import("./definition.js").IO<R, E, A>, k: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any, __tsplusTrace?: string) => (fiberId: FiberId) => (f: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any) => void;
|
21
|
-
unsafeRunAsync: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => void;
|
22
|
-
unsafeRunAsyncWith: <E, A>(io: import("./definition.js").IO<R, E, A>, k: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any, __tsplusTrace?: string) => void;
|
23
21
|
unsafeRunPromiseExit: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => Promise<import("@fncts/base/data/Exit.js").Exit<E, A>>;
|
22
|
+
unsafeRunPromise: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => Promise<A>;
|
24
23
|
unsafeRunOrFork: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Either.js").Either<import("@fncts/io/Fiber").Fiber.Runtime<E, A>, import("@fncts/base/data/Exit.js").Exit<E, A>>;
|
24
|
+
unsafeRun: <E, A>(io: import("./definition.js").IO<R, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Exit.js").Exit<E, A>;
|
25
25
|
}
|
26
26
|
/**
|
27
27
|
* @tsplus static fncts.io.IOOps runtime
|
@@ -34,28 +34,18 @@ export declare const defaultRuntime: Runtime<never>;
|
|
34
34
|
* @tsplus location "@fncts/io/IO/runtime"
|
35
35
|
*/
|
36
36
|
export declare const unsafeRunFiber: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => FiberRuntime<E, A>;
|
37
|
-
/**
|
38
|
-
* @tsplus fluent fncts.io.IO unsafeRunAsync
|
39
|
-
* @tsplus location "@fncts/io/IO/runtime"
|
40
|
-
*/
|
41
|
-
export declare const unsafeRunAsync: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => void;
|
42
|
-
/**
|
43
|
-
* @tsplus fluent fncts.io.IO unsafeRunAsyncWith
|
44
|
-
* @tsplus location "@fncts/io/IO/runtime"
|
45
|
-
*/
|
46
|
-
export declare const unsafeRunAsyncWith: <E, A>(io: import("./definition.js").IO<never, E, A>, k: (exit: import("@fncts/base/data/Exit.js").Exit<E, A>) => any, __tsplusTrace?: string) => void;
|
47
37
|
/**
|
48
38
|
* @tsplus fluent fncts.io.IO unsafeRunPromiseExit
|
49
39
|
* @tsplus location "@fncts/io/IO/runtime"
|
50
40
|
*/
|
51
41
|
export declare const unsafeRunPromiseExit: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => Promise<import("@fncts/base/data/Exit.js").Exit<E, A>>;
|
52
42
|
/**
|
53
|
-
* @tsplus
|
43
|
+
* @tsplus getter fncts.io.IO unsafeRunOrFork
|
54
44
|
* @tsplus location "@fncts/io/IO/runtime"
|
55
45
|
*/
|
56
|
-
export declare const
|
46
|
+
export declare const unsafeRunOrFork: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Either.js").Either<import("@fncts/io/Fiber").Fiber.Runtime<E, A>, import("@fncts/base/data/Exit.js").Exit<E, A>>;
|
57
47
|
/**
|
58
|
-
* @tsplus getter fncts.io.IO
|
48
|
+
* @tsplus getter fncts.io.IO unsafeRun
|
59
49
|
* @tsplus location "@fncts/io/IO/runtime"
|
60
50
|
*/
|
61
|
-
export declare const
|
51
|
+
export declare const unsafeRun: <E, A>(io: import("./definition.js").IO<never, E, A>, __tsplusTrace?: string) => import("@fncts/base/data/Exit.js").Exit<E, A>;
|
package/STM/definition.d.ts
CHANGED
@@ -22,7 +22,7 @@ export type STMTypeId = typeof STMTypeId;
|
|
22
22
|
*/
|
23
23
|
export declare abstract class STM<R, E, A> {
|
24
24
|
readonly [IOTypeId]: IOTypeId;
|
25
|
-
readonly
|
25
|
+
readonly _tag = IOOpCode.Commit;
|
26
26
|
readonly trace?: string;
|
27
27
|
readonly [STMTypeId]: STMTypeId;
|
28
28
|
[IOVariance]: {
|
package/Stream/api.d.ts
CHANGED
@@ -345,7 +345,7 @@ export declare function distributedWithDynamic<E, A>(maximumLag: number, decide:
|
|
345
345
|
* @tsplus getter fncts.io.Stream drain
|
346
346
|
* @tsplus location "@fncts/io/Stream/api"
|
347
347
|
*/
|
348
|
-
export declare function drain<R, E, A>(fa: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E,
|
348
|
+
export declare function drain<R, E, A>(fa: Stream<R, E, A>, __tsplusTrace?: string): Stream<R, E, never>;
|
349
349
|
/**
|
350
350
|
* Drops the specified number of elements from this stream.
|
351
351
|
* @tsplus pipeable fncts.io.Stream drop
|
@@ -420,6 +420,12 @@ export declare function environmentWithIO<R0, R, E, A>(f: (r0: Environment<R0>)
|
|
420
420
|
* @tsplus location "@fncts/io/Stream/api"
|
421
421
|
*/
|
422
422
|
export declare function environmentWithStream<R0, R, E, A>(f: (r0: Environment<R0>) => Stream<R, E, A>, __tsplusTrace?: string): Stream<R0 | R, E, A>;
|
423
|
+
/**
|
424
|
+
* Creates a stream that executes the specified effect but emits no elements.
|
425
|
+
* @tsplus static fncts.io.StreamOps execute
|
426
|
+
* @tsplus location "@fncts/io/Stream/api"
|
427
|
+
*/
|
428
|
+
export declare function execute<R, E>(io: IO<R, E, any>, __tsplusTrace?: string): Stream<R, E, never>;
|
423
429
|
/**
|
424
430
|
* Halt a stream with the specified error
|
425
431
|
* @tsplus static fncts.io.StreamOps failNow
|
@@ -529,6 +535,12 @@ export declare function fromChunk<O>(c: Lazy<Conc<O>>, __tsplusTrace?: string):
|
|
529
535
|
* @tsplus location "@fncts/io/Stream/api"
|
530
536
|
*/
|
531
537
|
export declare function scoped<R, E, A>(stream: Lazy<IO<R, E, A>>, __tsplusTrace?: string): Stream<Exclude<R, Scope>, E, A>;
|
538
|
+
/**
|
539
|
+
* Emits a sliding window of n elements.
|
540
|
+
* @tsplus pipeable fncts.io.Stream sliding
|
541
|
+
* @tsplus location "@fncts/io/Stream/api"
|
542
|
+
*/
|
543
|
+
export declare function sliding(chunkSize: number, stepSize: number, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, import("@fncts/base/collection/immutable/Conc.js").Conc<A>>;
|
532
544
|
/**
|
533
545
|
* Creates a stream from an effect producing a value of type `A`
|
534
546
|
* @tsplus static fncts.io.StreamOps fromIO
|
@@ -742,6 +754,50 @@ export declare function mapIOConcurrently<A, R1, E1, B>(n: number, f: (a: A) =>
|
|
742
754
|
* @tsplus location "@fncts/io/Stream/api"
|
743
755
|
*/
|
744
756
|
export declare function mapIOConcurrentlyUnordered<A, R1, E1, B>(n: number, f: (a: A) => IO<R1, E1, B>): <R, E>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
|
757
|
+
/**
|
758
|
+
* Merges this stream and the specified stream together.
|
759
|
+
*
|
760
|
+
* New produced stream will terminate when both specified stream terminate if
|
761
|
+
* no termination strategy is specified.
|
762
|
+
* @tsplus pipeable fncts.io.Stream merge
|
763
|
+
* @tsplus location "@fncts/io/Stream/api"
|
764
|
+
*/
|
765
|
+
export declare function merge<R1, E1, B>(that: Stream<R1, E1, B>, strategy?: TerminationStrategy, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
|
766
|
+
/**
|
767
|
+
* Merges this stream and the specified stream together. New produced stream
|
768
|
+
* will terminate when either stream terminates.
|
769
|
+
* @tsplus pipeable fncts.io.Stream mergeHaltEither
|
770
|
+
* @tsplus location "@fncts/io/Stream/api"
|
771
|
+
*/
|
772
|
+
export declare function mergeHaltEither<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
|
773
|
+
/**
|
774
|
+
* Merges this stream and the specified stream together. New produced stream
|
775
|
+
* will terminate when this stream terminates.
|
776
|
+
* @tsplus pipeable fncts.io.Stream mergeHaltLeft
|
777
|
+
* @tsplus location "@fncts/io/Stream/api"
|
778
|
+
*/
|
779
|
+
export declare function mergeHaltLeft<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
|
780
|
+
/**
|
781
|
+
* Merges this stream and the specified stream together. New produced stream
|
782
|
+
* will terminate when the specified stream terminates.
|
783
|
+
* @tsplus pipeable fncts.io.Stream mergeHaltRight
|
784
|
+
* @tsplus location "@fncts/io/Stream/api"
|
785
|
+
*/
|
786
|
+
export declare function mergeHaltRight<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B | A>;
|
787
|
+
/**
|
788
|
+
* Merges this stream and the specified stream together, discarding the values
|
789
|
+
* from the right stream.
|
790
|
+
* @tsplus pipeable fncts.io.Stream mergeLeft
|
791
|
+
* @tsplus location "@fncts/io/Stream/api"
|
792
|
+
*/
|
793
|
+
export declare function mergeLeft<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, A>;
|
794
|
+
/**
|
795
|
+
* Merges this stream and the specified stream together, discarding the values
|
796
|
+
* from the left stream.
|
797
|
+
* @tsplus pipeable fncts.io.Stream mergeRight
|
798
|
+
* @tsplus location "@fncts/io/Stream/api"
|
799
|
+
*/
|
800
|
+
export declare function mergeRight<R1, E1, B>(that: Stream<R1, E1, B>, __tsplusTrace?: string): <R, E, A>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
|
745
801
|
/**
|
746
802
|
* Maps each element of this stream to another stream and returns the
|
747
803
|
* non-deterministic merge of those streams, executing up to `n` inner streams
|
@@ -964,6 +1020,11 @@ export declare function scanReduce<A extends B, B>(f: (b: B, a: A) => B, __tsplu
|
|
964
1020
|
* @tsplus location "@fncts/io/Stream/api"
|
965
1021
|
*/
|
966
1022
|
export declare function scanReduceIO<A extends B, R1, E1, B>(f: (b: B, a: A) => IO<R1, E1, B>, __tsplusTrace?: string): <R, E>(fa: Stream<R, E, A>) => Stream<R1 | R, E1 | E, B>;
|
1023
|
+
/**
|
1024
|
+
* @tsplus pipeable fncts.io.Stream split
|
1025
|
+
* @tsplus location "@fncts/io/Stream/api"
|
1026
|
+
*/
|
1027
|
+
export declare function split<A>(predicate: Predicate<A>, __tsplusTrace?: string): <R, E>(self: Stream<R, E, A>) => Stream<R, E, import("@fncts/base/collection/immutable/Conc.js").Conc<A>>;
|
967
1028
|
/**
|
968
1029
|
* Creates a single-valued pure stream
|
969
1030
|
* @tsplus static fncts.io.StreamOps succeedNow
|
@@ -999,6 +1060,33 @@ export declare function takeUntil<A>(p: Predicate<A>, __tsplusTrace?: string): <
|
|
999
1060
|
* @tsplus location "@fncts/io/Stream/api"
|
1000
1061
|
*/
|
1001
1062
|
export declare function tap<A, R1, E1>(f: (a: A) => IO<R1, E1, any>, __tsplusTrace?: string): <R, E>(ma: Stream<R, E, A>) => Stream<R1 | R, E1 | E, A>;
|
1063
|
+
/**
|
1064
|
+
* Returns a stream that effectfully "peeks" at the failure and adds an effect
|
1065
|
+
* to consumption of every element of the stream
|
1066
|
+
* @tsplus pipeable fncts.io.Stream tapBoth
|
1067
|
+
* @tsplus location "@fncts/io/Stream/api"
|
1068
|
+
*/
|
1069
|
+
export declare function tapBoth<E, A, R1, E1, R2, E2>(f: (e: E) => IO<R1, E1, any>, g: (a: A) => IO<R2, E2, any>, __tsplusTrace?: string): <R>(self: Stream<R, E, A>) => Stream<R1 | R2 | R, E | E1 | E2, A>;
|
1070
|
+
/**
|
1071
|
+
* Returns a stream that effectfully "peeks" at the failure of the stream.
|
1072
|
+
* @tsplus pipeable fncts.io.Stream tapError
|
1073
|
+
* @tsplus location "@fncts/io/Stream/api"
|
1074
|
+
*/
|
1075
|
+
export declare function tapError<E, R1, E1>(f: (e: E) => IO<R1, E1, any>, __tsplusTrace?: string): <R, A>(self: Stream<R, E, A>) => Stream<R1 | R, E | E1, A>;
|
1076
|
+
/**
|
1077
|
+
* Returns a stream that effectfully "peeks" at the cause of failure of the
|
1078
|
+
* stream.
|
1079
|
+
* @tsplus pipeable fncts.io.Stream tapErrorCause
|
1080
|
+
* @tsplus location "@fncts/io/Stream/api"
|
1081
|
+
*/
|
1082
|
+
export declare function tapErrorCause<E, R1, E1>(f: (cause: Cause<E>) => IO<R1, E1, any>, __tsplusTrace?: string): <R, A>(self: Stream<R, E, A>) => Stream<R1 | R, E | E1, A>;
|
1083
|
+
/**
|
1084
|
+
* Sends all elements emitted by this stream to the specified sink in addition
|
1085
|
+
* to emitting them.
|
1086
|
+
* @tsplus pipeable fncts.io.Stream tapSink
|
1087
|
+
* @tsplus location "@fncts/io/Stream/api"
|
1088
|
+
*/
|
1089
|
+
export declare function tapSink<A, R1, E1>(sink: Sink<R1, E1, A, any, any>, __tsplusTrace?: string): <R, E>(self: Stream<R, E, A>) => Stream<R1 | R, E1 | E, A>;
|
1002
1090
|
/**
|
1003
1091
|
* Throttles the chunks of this stream according to the given bandwidth parameters using the token bucket
|
1004
1092
|
* algorithm. Allows for burst in the processing of elements by allowing the token bucket to accumulate
|
@@ -34,7 +34,7 @@ function mapOutConcurrentIO(n, f) {
|
|
34
34
|
return tsplus_module_2.unwrapScoped(() => tsplus_module_5.map(queue => {
|
35
35
|
const consumer = tsplus_module_2.unwrap(() => tsplus_module_5.matchCause(tsplus_module_1.failCauseNow, r => tsplus_module_3.match(tsplus_module_1.endNow, outElem => tsplus_module_1.zipRight(consumer)(tsplus_module_2.writeNow(outElem)))(r), fileName_1 + ":58:42")(tsplus_module_5.flatten(tsplus_module_4.take(queue, fileName_1 + ":58:18"), fileName_1 + ":58:23")));
|
36
36
|
return consumer;
|
37
|
-
}, fileName_1 + ":55:12")(tsplus_module_19.withChildren(getChildren => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(queue => tsplus_module_5.flatMap(errorSignal => tsplus_module_5.flatMap(permits => tsplus_module_5.flatMap(pull => tsplus_module_5.map(() => queue, fileName_1 + ":24:12")(tsplus_module_12.fork(tsplus_module_7.uninterruptible(tsplus_module_5.forever(tsplus_module_5.matchCauseIO(cause => tsplus_module_4.offer(tsplus_module_5.failCauseNow(cause, fileName_1 + ":26:53"), fileName_1 + ":26:37")(queue), r => tsplus_module_3.match(outDone => tsplus_module_5.asUnit(tsplus_module_5.zipRight(tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_6.left(outDone), fileName_1 + ":32:72"), fileName_1 + ":32:58")(queue), fileName_1 + ":32:46")(tsplus_module_7.interruptible(permits.withPermits(n)(tsplus_module_5.unit), fileName_1 + ":31:47")), fileName_1 + ":32:96"), outElem => tsplus_module_5.flatMap(p => tsplus_module_5.flatMap(latch => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(() => tsplus_module_5.map(() => void 0, fileName_1 + ":48:24")(tsplus_module_8.wait(latch, fileName_1 + ":48:30")), fileName_1 + ":38:24")(permits.withPermit(tsplus_module_5.zipRight(tsplus_module_10.fulfill(p, fileName_1 + ":44:39")(tsplus_module_5.tapErrorCause(c => tsplus_module_8.failCause(c, fileName_1 + ":43:64")(p), fileName_1 + ":43:45")(tsplus_module_9.raceFirst(f(outElem), fileName_1 + ":42:41")(tsplus_module_8.wait(errorSignal, fileName_1 + ":41:40")))), fileName_1 + ":40:60")(tsplus_module_8.succeed_(undefined, fileName_1 + ":40:40")(latch)))), fileName_1 + ":37:24")(tsplus_module_4.offer(tsplus_module_5.map(tsplus_module_6.right, fileName_1 + ":37:48")(tsplus_module_8.wait(p, fileName_1 + ":37:38")), fileName_1 + ":37:36")(queue)), fileName_1 + ":36:38")(tsplus_module_11.make(fileName_1 + ":36:50")), fileName_1 + ":35:38")(tsplus_module_11.make(fileName_1 + ":35:50")))(r), fileName_1 + ":25:30")(pull), fileName_1 + ":51:14"), fileName_1 + ":51:22"), fileName_1 + ":51:38")), fileName_1 + ":23:32")(tsplus_module_13.toPull(self)), fileName_1 + ":22:32")(tsplus_module_14.makeSemaphore(n, fileName_1 + ":22:42")), fileName_1 + ":21:32")(tsplus_module_11.make(fileName_1 + ":21:44")), fileName_1 + ":15:26")(tsplus_module_16.acquireRelease(() => tsplus_module_15.makeBounded(n, fileName_1 + ":17:32"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":18:31"), fileName_1 + ":16:30")), fileName_1 + ":14:12")(tsplus_module_18.addFinalizer(() => tsplus_module_5.flatMap(tsplus_module_17.interruptAll, fileName_1 + ":14:48")(getChildren), fileName_1 + ":14:28")), fileName_1 + ":12:22")));
|
37
|
+
}, fileName_1 + ":55:12")(tsplus_module_19.withChildren(getChildren => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(queue => tsplus_module_5.flatMap(errorSignal => tsplus_module_5.flatMap(permits => tsplus_module_5.flatMap(pull => tsplus_module_5.map(() => queue, fileName_1 + ":24:12")(tsplus_module_12.fork(tsplus_module_7.uninterruptible(tsplus_module_5.forever(tsplus_module_5.matchCauseIO(cause => tsplus_module_4.offer(tsplus_module_5.failCauseNow(cause, fileName_1 + ":26:53"), fileName_1 + ":26:37")(queue), r => tsplus_module_3.match(outDone => tsplus_module_5.asUnit(tsplus_module_5.zipRight(tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_6.left(outDone, fileName_1 + ":32:84"), fileName_1 + ":32:72"), fileName_1 + ":32:58")(queue), fileName_1 + ":32:46")(tsplus_module_7.interruptible(permits.withPermits(n)(tsplus_module_5.unit), fileName_1 + ":31:47")), fileName_1 + ":32:96"), outElem => tsplus_module_5.flatMap(p => tsplus_module_5.flatMap(latch => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(() => tsplus_module_5.map(() => void 0, fileName_1 + ":48:24")(tsplus_module_8.wait(latch, fileName_1 + ":48:30")), fileName_1 + ":38:24")(permits.withPermit(tsplus_module_5.zipRight(tsplus_module_10.fulfill(p, fileName_1 + ":44:39")(tsplus_module_5.tapErrorCause(c => tsplus_module_8.failCause(c, fileName_1 + ":43:64")(p), fileName_1 + ":43:45")(tsplus_module_9.raceFirst(f(outElem), fileName_1 + ":42:41")(tsplus_module_8.wait(errorSignal, fileName_1 + ":41:40")))), fileName_1 + ":40:60")(tsplus_module_8.succeed_(undefined, fileName_1 + ":40:40")(latch)))), fileName_1 + ":37:24")(tsplus_module_4.offer(tsplus_module_5.map(tsplus_module_6.right, fileName_1 + ":37:48")(tsplus_module_8.wait(p, fileName_1 + ":37:38")), fileName_1 + ":37:36")(queue)), fileName_1 + ":36:38")(tsplus_module_11.make(fileName_1 + ":36:50")), fileName_1 + ":35:38")(tsplus_module_11.make(fileName_1 + ":35:50")))(r), fileName_1 + ":25:30")(pull), fileName_1 + ":51:14"), fileName_1 + ":51:22"), fileName_1 + ":51:38")), fileName_1 + ":23:32")(tsplus_module_13.toPull(self)), fileName_1 + ":22:32")(tsplus_module_14.makeSemaphore(n, fileName_1 + ":22:42")), fileName_1 + ":21:32")(tsplus_module_11.make(fileName_1 + ":21:44")), fileName_1 + ":15:26")(tsplus_module_16.acquireRelease(() => tsplus_module_15.makeBounded(n, fileName_1 + ":17:32"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":18:31"), fileName_1 + ":16:30")), fileName_1 + ":14:12")(tsplus_module_18.addFinalizer(() => tsplus_module_5.flatMap(tsplus_module_17.interruptAll, fileName_1 + ":14:48")(getChildren), fileName_1 + ":14:28")), fileName_1 + ":12:22")));
|
38
38
|
};
|
39
39
|
}
|
40
40
|
//# sourceMappingURL=mapOutConcurrentIO.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mapOutConcurrentIO.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGM,SAAUA,kBAAkB,CAChCC,CAAS,EACTC,CAA8C;EAE9C,OACEC,IAAmE,IACgB;IACnF,OAAOC,mCACLC,oBA2COC,KAAK,IAAI;MACd,MAAMC,QAAQ,GACZH,6BACEC,yDAAqDG,CAAC,IACpDC,8CAAyBC,OAAO,IAAKC,yBAAmCJ,QAAQ,EAA3CH,yBAAiBM,OAAO,CAAC,CAAmB,EAAjFF,CAAC,CAAiF,sEADpFF,KAAK,iDAEJ,CACF;MACH,OAAOC,QAAQ;IACjB,CAAC,yBAnDDK,8BAAiBC,WAAW,IAAIR,sDAGtBC,KAAK,4BAMLQ,WAAW,4BACXC,OAAO,4BACPC,IAAI,8BA8BHV,KAAK,uGA5BVD,6BACGY,KAAK,IAAKC,sBAAYb,6BAAgBY,KAAK,wBAAC,yBAAlCX,KAAK,CAA8B,EAC7CE,CAAC,IACAC,sBACGU,OAAO,IAAId,uBACVA,yBAE0Ba,sBAAYb,2BAAce,qBAAYD,OAAO,
|
1
|
+
{"version":3,"file":"mapOutConcurrentIO.cjs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BmBb,IAAI,2BADJ4B,+BAAU9B,CAAC,wBAAC,0BADZ6B,4CAA6B,0BALjDE,sCACEC,6BAAyEhC,CAAC,wBAAC,EAC1EK,KAAK,IAAIY,yBAACZ,KAAK,wBAAS,wBAC1B,0BALD4B,oCAAgB7B,yFAAW,CAA4B,wBAAC,CAwC1D,wBACH,CAQC,CACH;EACH,CAAC;AACH","names":["mapOutConcurrentIO","n","f","self","tsplus_module_2","tsplus_module_5","queue","consumer","r","tsplus_module_3","outElem","tsplus_module_1","tsplus_module_19","getChildren","errorSignal","permits","pull","cause","tsplus_module_4","outDone","tsplus_module_6","withPermits","p","latch","withPermit","tsplus_module_10","c","tsplus_module_8","tsplus_module_9","undefined","tsplus_module_11","tsplus_module_14","tsplus_module_16","tsplus_module_15","tsplus_module_18"],"sourceRoot":"","sources":["../../../_src/Channel/api/mapOutConcurrentIO.ts"],"sourcesContent":[null]}
|
@@ -43,8 +43,8 @@ function mergeAllWith(n, f, bufferSize = 16, mergeStrategy = "BackPressure") {
|
|
43
43
|
const consumer = tsplus_module_2.unwrap(() => tsplus_module_5.matchCause(tsplus_module_1.failCauseNow, out => tsplus_module_3.match(tsplus_module_1.endNow, outElem => tsplus_module_1.zipRight(consumer)(tsplus_module_2.writeNow(outElem)))(out), fileName_1 + ":121:42")(tsplus_module_5.flatten(tsplus_module_4.take(queue, fileName_1 + ":121:18"), fileName_1 + ":121:23")));
|
44
44
|
return consumer;
|
45
45
|
}, fileName_1 + ":118:12")(tsplus_module_26.withChildren(getChildren => tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(queue => tsplus_module_5.flatMap(cancelers => tsplus_module_5.flatMap(lastDone => tsplus_module_5.flatMap(errorSignal => tsplus_module_5.flatMap(permits => tsplus_module_5.flatMap(pull => {
|
46
|
-
const evaluatePull = pull => tsplus_module_5.flatMap(md1 => tsplus_module_9.match(() => tsplus_module_5.unit, outDone => tsplus_module_19.update(md2 => tsplus_module_9.match(() => tsplus_module_18.just(outDone), lastDone => tsplus_module_18.just(f(lastDone, outDone)))(md2), fileName_1 + ":53:36")(lastDone))(md1), fileName_1 + ":49:23")(tsplus_module_5.repeatUntil(m => tsplus_module_20.isJust(m), fileName_1 + ":48:27")(tsplus_module_5.flatMap(ea => tsplus_module_3.match(outDone => tsplus_module_5.succeedNow(tsplus_module_18.just(outDone), fileName_1 + ":44:45"), outElem => tsplus_module_5.as(() => tsplus_module_18.nothing(), fileName_1 + ":45:84")(tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_8.right(outElem), fileName_1 + ":45:57"), fileName_1 + ":45:43")(queue)))(ea), fileName_1 + ":42:23")(pull)));
|
47
|
-
return tsplus_module_5.map(() => queue, fileName_1 + ":61:12")(tsplus_module_13.fork(tsplus_module_5.repeatWhile(_function.identity, fileName_1 + ":114:27")(tsplus_module_5.matchCauseIO(cause => tsplus_module_5.zipRight(tsplus_module_5.as(() => false, fileName_1 + ":65:106")(tsplus_module_4.offer(tsplus_module_5.failCauseNow(cause, fileName_1 + ":65:95"), fileName_1 + ":65:79")(queue)), fileName_1 + ":65:67")(tsplus_module_5.flatMap(tsplus_module_6.interruptAll, fileName_1 + ":65:38")(getChildren)), doneOrChannel => tsplus_module_3.match(outDone => tsplus_module_12.raceWith(() => permits.withPermits(n)(tsplus_module_5.unit), (_, permitAcquisition) => tsplus_module_5.zipRight(tsplus_module_5.as(() => false, fileName_1 + ":72:106")(tsplus_module_7.interrupt(permitAcquisition)), fileName_1 + ":72:75")(tsplus_module_5.flatMap(tsplus_module_6.interruptAll, fileName_1 + ":72:46")(getChildren)), (_, failureAwait) => tsplus_module_5.zipRight(tsplus_module_5.as(() => false, fileName_1 + ":82:34")(tsplus_module_5.flatMap(maybeDone => tsplus_module_9.match(() => tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_8.left(outDone), fileName_1 + ":78:66"), fileName_1 + ":78:52")(queue), lastDone => tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_8.left(f(lastDone, outDone)), fileName_1 + ":79:74"), fileName_1 + ":79:60")(queue))(maybeDone), fileName_1 + ":76:39")(tsplus_module_10.get(lastDone, fileName_1 + ":75:37"))), fileName_1 + ":74:58")(tsplus_module_7.interrupt(failureAwait)), fileName_1 + ":69:49")(tsplus_module_11.wait(errorSignal, fileName_1 + ":69:34")), channel => {
|
46
|
+
const evaluatePull = pull => tsplus_module_5.flatMap(md1 => tsplus_module_9.match(() => tsplus_module_5.unit, outDone => tsplus_module_19.update(md2 => tsplus_module_9.match(() => tsplus_module_18.just(outDone, fileName_1 + ":55:35"), lastDone => tsplus_module_18.just(f(lastDone, outDone), fileName_1 + ":56:43"))(md2), fileName_1 + ":53:36")(lastDone))(md1), fileName_1 + ":49:23")(tsplus_module_5.repeatUntil(m => tsplus_module_20.isJust(m), fileName_1 + ":48:27")(tsplus_module_5.flatMap(ea => tsplus_module_3.match(outDone => tsplus_module_5.succeedNow(tsplus_module_18.just(outDone, fileName_1 + ":44:50"), fileName_1 + ":44:45"), outElem => tsplus_module_5.as(() => tsplus_module_18.nothing(fileName_1 + ":45:92"), fileName_1 + ":45:84")(tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_8.right(outElem, fileName_1 + ":45:70"), fileName_1 + ":45:57"), fileName_1 + ":45:43")(queue)))(ea), fileName_1 + ":42:23")(pull)));
|
47
|
+
return tsplus_module_5.map(() => queue, fileName_1 + ":61:12")(tsplus_module_13.fork(tsplus_module_5.repeatWhile(_function.identity, fileName_1 + ":114:27")(tsplus_module_5.matchCauseIO(cause => tsplus_module_5.zipRight(tsplus_module_5.as(() => false, fileName_1 + ":65:106")(tsplus_module_4.offer(tsplus_module_5.failCauseNow(cause, fileName_1 + ":65:95"), fileName_1 + ":65:79")(queue)), fileName_1 + ":65:67")(tsplus_module_5.flatMap(tsplus_module_6.interruptAll, fileName_1 + ":65:38")(getChildren)), doneOrChannel => tsplus_module_3.match(outDone => tsplus_module_12.raceWith(() => permits.withPermits(n)(tsplus_module_5.unit), (_, permitAcquisition) => tsplus_module_5.zipRight(tsplus_module_5.as(() => false, fileName_1 + ":72:106")(tsplus_module_7.interrupt(permitAcquisition)), fileName_1 + ":72:75")(tsplus_module_5.flatMap(tsplus_module_6.interruptAll, fileName_1 + ":72:46")(getChildren)), (_, failureAwait) => tsplus_module_5.zipRight(tsplus_module_5.as(() => false, fileName_1 + ":82:34")(tsplus_module_5.flatMap(maybeDone => tsplus_module_9.match(() => tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_8.left(outDone, fileName_1 + ":78:78"), fileName_1 + ":78:66"), fileName_1 + ":78:52")(queue), lastDone => tsplus_module_4.offer(tsplus_module_5.succeedNow(tsplus_module_8.left(f(lastDone, outDone), fileName_1 + ":79:86"), fileName_1 + ":79:74"), fileName_1 + ":79:60")(queue))(maybeDone), fileName_1 + ":76:39")(tsplus_module_10.get(lastDone, fileName_1 + ":75:37"))), fileName_1 + ":74:58")(tsplus_module_7.interrupt(failureAwait)), fileName_1 + ":69:49")(tsplus_module_11.wait(errorSignal, fileName_1 + ":69:34")), channel => {
|
48
48
|
switch (mergeStrategy) {
|
49
49
|
case "BackPressure":
|
50
50
|
return tsplus_module_5.flatMap(latch => {
|
@@ -58,7 +58,7 @@ function mergeAllWith(n, f, bufferSize = 16, mergeStrategy = "BackPressure") {
|
|
58
58
|
}, fileName_1 + ":102:30")(tsplus_module_5.when(() => size >= 0, fileName_1 + ":102:87")(tsplus_module_5.flatMap(f => tsplus_module_11.succeed_(undefined, fileName_1 + ":102:70")(f), fileName_1 + ":102:53")(tsplus_module_4.take(cancelers, fileName_1 + ":102:40")))), fileName_1 + ":101:47")(tsplus_module_4.size(cancelers, fileName_1 + ":101:57")), fileName_1 + ":100:47")(tsplus_module_17.make(fileName_1 + ":100:59")), fileName_1 + ":99:47")(tsplus_module_17.make(fileName_1 + ":99:59"));
|
59
59
|
}
|
60
60
|
})(doneOrChannel), fileName_1 + ":63:28")(pull)), fileName_1 + ":114:37"));
|
61
|
-
}, fileName_1 + ":39:33")(tsplus_module_15.toPull(channels)), fileName_1 + ":38:33")(tsplus_module_21.makeSemaphore(n, fileName_1 + ":38:43")), fileName_1 + ":37:33")(tsplus_module_17.make(fileName_1 + ":37:45")), fileName_1 + ":36:33")(tsplus_module_22.make(() => tsplus_module_18.nothing(), fileName_1 + ":36:42")), fileName_1 + ":35:33")(tsplus_module_24.acquireRelease(() => tsplus_module_23.makeUnbounded(fileName_1 + ":35:71"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":35:112"), fileName_1 + ":35:51")), fileName_1 + ":29:26")(tsplus_module_24.acquireRelease(() => tsplus_module_23.makeBounded(bufferSize, fileName_1 + ":31:32"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":32:31"), fileName_1 + ":30:30")), fileName_1 + ":28:12")(tsplus_module_25.addFinalizer(() => tsplus_module_5.flatMap(tsplus_module_6.interruptAll, fileName_1 + ":28:48")(getChildren), fileName_1 + ":28:28")), fileName_1 + ":26:22")));
|
61
|
+
}, fileName_1 + ":39:33")(tsplus_module_15.toPull(channels)), fileName_1 + ":38:33")(tsplus_module_21.makeSemaphore(n, fileName_1 + ":38:43")), fileName_1 + ":37:33")(tsplus_module_17.make(fileName_1 + ":37:45")), fileName_1 + ":36:33")(tsplus_module_22.make(() => tsplus_module_18.nothing(fileName_1 + ":36:66"), fileName_1 + ":36:42")), fileName_1 + ":35:33")(tsplus_module_24.acquireRelease(() => tsplus_module_23.makeUnbounded(fileName_1 + ":35:71"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":35:112"), fileName_1 + ":35:51")), fileName_1 + ":29:26")(tsplus_module_24.acquireRelease(() => tsplus_module_23.makeBounded(bufferSize, fileName_1 + ":31:32"), queue => tsplus_module_4.shutdown(queue, fileName_1 + ":32:31"), fileName_1 + ":30:30")), fileName_1 + ":28:12")(tsplus_module_25.addFinalizer(() => tsplus_module_5.flatMap(tsplus_module_6.interruptAll, fileName_1 + ":28:48")(getChildren), fileName_1 + ":28:28")), fileName_1 + ":26:22")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qC,OAAO,0BAAzCK,0BAAcC,SAAS,0BAAvBP,KAAK,CAAmB,CAAkB,CAAC;uCAJ9DpC,2BAAyD8C,IAAI,IAAI,CAAC,0BAAlE9C,wBAAwBL,CAAC,IAAK+C,0BAAUC,SAAS,0BAAnBhD,CAAC,CAAmB,+CAAlDc,SAAS,0BAA0C,CAAgB,gDADlDA,SAAS,oDADTmC,6CAA0B,0BAD1BA,4CAA0B;QAU5C;MAET,CAAC,EA5CHhB,aAAa,CA6CZ,yBAlDPf,IAAI,CAmDD,CACqB;sDA3EHf,QAAQ,2BADRiD,+BAAUrD,CAAC,wBAAC,0BADZkD,4CAA0B,0BAD1BI,4BAAyB5B,+CAAS,wBAAC,0BADnC6B,sCAAkBC,qDAA0C,EAAGjD,KAAK,IAAIuB,yBAACvB,KAAK,yBAAS,wBAAC,0BAL7GgD,sCACEC,6BAAuEtD,UAAU,wBAAC,EACjFK,KAAK,IAAIuB,yBAACvB,KAAK,wBAAS,wBAC1B,0BALDkD,oCAAgBnD,wFAAW,CAA4B,wBAAC,CAyF1D,wBACH,CAQC,CACH;EACH,CAAC;AACH","names":["mergeAllWith","n","f","bufferSize","mergeStrategy","channels","tsplus_module_2","tsplus_module_5","queue","consumer","out","tsplus_module_3","outElem","tsplus_module_1","tsplus_module_26","getChildren","cancelers","lastDone","errorSignal","permits","pull","evaluatePull","md1","tsplus_module_9","outDone","tsplus_module_19","md2","tsplus_module_18","m","tsplus_module_20","ea","tsplus_module_4","tsplus_module_8","identity","cause","doneOrChannel","tsplus_module_12","withPermits","_","permitAcquisition","failureAwait","maybeDone","channel","latch","raceIOs","io","tsplus_module_14","b","withPermit","tsplus_module_11","undefined","tsplus_module_17","canceler","size","tsplus_module_21","tsplus_module_22","tsplus_module_24","tsplus_module_23","tsplus_module_25"],"sourceRoot":"","sources":["../../../_src/Channel/api/mergeAllWith.ts"],"sourcesContent":[null]}
|
@@ -40,10 +40,10 @@ function mergeWith(that, leftDone, rightDone) {
|
|
40
40
|
case "Done" /* MergeDecisionTag.Done */:
|
41
41
|
return tsplus_module_3.succeedNow(tsplus_module_4.fromIO(() => tsplus_module_3.zipRight(decision.io, fileName_1 + ":98:79")(tsplus_module_11.interrupt(fiber))), fileName_1 + ":98:39");
|
42
42
|
case "Await" /* MergeDecisionTag.Await */:
|
43
|
-
return tsplus_module_3.map(ex => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => decision.f(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(done => tsplus_module_4.fromIO(() => decision.f(tsplus_module_8.succeed(done))), elem => tsplus_module_5.zipRight(go(single(decision.f)))(tsplus_module_4.writeNow(elem)))(r))(ex), fileName_1 + ":100:41")(tsplus_module_12.wait(fiber, fileName_1 + ":100:31"));
|
43
|
+
return tsplus_module_3.map(ex => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => decision.f(tsplus_module_8.failCause(cause, fileName_1 + ":102:74"))), r => tsplus_module_9.match(done => tsplus_module_4.fromIO(() => decision.f(tsplus_module_8.succeed(done, fileName_1 + ":105:75"))), elem => tsplus_module_5.zipRight(go(single(decision.f)))(tsplus_module_4.writeNow(elem)))(r))(ex), fileName_1 + ":100:41")(tsplus_module_12.wait(fiber, fileName_1 + ":100:31"));
|
44
44
|
}
|
45
45
|
};
|
46
|
-
return tsplus_module_10.match(cause => onDecision(done(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(d => onDecision(done(tsplus_module_8.succeed(d))), elem => tsplus_module_3.map(leftFiber => tsplus_module_5.zipRight(go(both(leftFiber, fiber)))(tsplus_module_4.writeNow(elem)), fileName_1 + ":118:40")(tsplus_module_1.forkDaemon(pull, fileName_1 + ":118:25")))(r))(exit);
|
46
|
+
return tsplus_module_10.match(cause => onDecision(done(tsplus_module_8.failCause(cause, fileName_1 + ":113:56"))), r => tsplus_module_9.match(d => onDecision(done(tsplus_module_8.succeed(d, fileName_1 + ":116:54"))), elem => tsplus_module_3.map(leftFiber => tsplus_module_5.zipRight(go(both(leftFiber, fiber)))(tsplus_module_4.writeNow(elem)), fileName_1 + ":118:40")(tsplus_module_1.forkDaemon(pull, fileName_1 + ":118:25")))(r))(exit);
|
47
47
|
};
|
48
48
|
const go = state => {
|
49
49
|
switch (state._tag) {
|
@@ -54,9 +54,9 @@ function mergeWith(that, leftDone, rightDone) {
|
|
54
54
|
return tsplus_module_4.unwrap(() => tsplus_module_7.raceWith(() => rj, (leftEx, _) => handleSide(leftEx, state.right, pullL)(leftDone, (l, r) => tsplus_module_2.bothRunning(l, r), f => tsplus_module_2.leftDone(f)), (rightEx, _) => handleSide(rightEx, state.left, pullR)(rightDone, (l, r) => tsplus_module_2.bothRunning(r, l), f => tsplus_module_2.rightDone(f)), fileName_1 + ":138:28")(lj));
|
55
55
|
}
|
56
56
|
case "LeftDone" /* MergeStateTag.LeftDone */:
|
57
|
-
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(d => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.succeed(d))), elem => tsplus_module_5.zipRight(go(tsplus_module_2.leftDone(state.f)))(tsplus_module_4.writeNow(elem)))(r))(exit), fileName_1 + ":157:33")(tsplus_module_3.result(pullR, fileName_1 + ":157:22")));
|
57
|
+
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.failCause(cause, fileName_1 + ":159:69"))), r => tsplus_module_9.match(d => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.succeed(d, fileName_1 + ":162:67"))), elem => tsplus_module_5.zipRight(go(tsplus_module_2.leftDone(state.f)))(tsplus_module_4.writeNow(elem)))(r))(exit), fileName_1 + ":157:33")(tsplus_module_3.result(pullR, fileName_1 + ":157:22")));
|
58
58
|
case "RightDone" /* MergeStateTag.RightDone */:
|
59
|
-
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.failCause(cause))), r => tsplus_module_9.match(d => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.succeed(d))), elem => tsplus_module_5.zipRight(go(tsplus_module_2.rightDone(state.f)))(tsplus_module_4.writeNow(elem)))(r))(exit), fileName_1 + ":170:33")(tsplus_module_3.result(pullL, fileName_1 + ":170:22")));
|
59
|
+
return tsplus_module_4.unwrap(() => tsplus_module_3.map(exit => tsplus_module_10.match(cause => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.failCause(cause, fileName_1 + ":172:69"))), r => tsplus_module_9.match(d => tsplus_module_4.fromIO(() => state.f(tsplus_module_8.succeed(d, fileName_1 + ":175:67"))), elem => tsplus_module_5.zipRight(go(tsplus_module_2.rightDone(state.f)))(tsplus_module_4.writeNow(elem)))(r))(exit), fileName_1 + ":170:33")(tsplus_module_3.result(pullL, fileName_1 + ":170:22")));
|
60
60
|
}
|
61
61
|
};
|
62
62
|
return tsplus_module_4.embedInput(input)(tsplus_module_5.flatMap(go)(tsplus_module_4.fromIO(() => tsplus_module_3.zipWith(tsplus_module_1.forkDaemon(pullR, fileName_1 + ":184:41"), (a, b) => tsplus_module_2.bothRunning(a, b), fileName_1 + ":184:35")(tsplus_module_1.forkDaemon(pullL, fileName_1 + ":184:16")))));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mergeWith.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;AAOM,SAAUA,SAAS,CAiBvBC,IAA0E,EAC1EC,QAAkG,EAClGC,SAAmG;EAEnG,OACEC,IAAmE,IASjE;IACF,OAAOC,2DAEGC,KAAK;MACX,MAAMC,WAAW,GAAGF,0BAAkBC,KAAK,CAAC;qCACtCE,KAAK,wBACLC,KAAK;QAWX,MAAMC,UAAU,GACd,CACEC,IAAiD,EACjDC,KAAqD,EACrDC,IAAyE,KAE3E,CACEC,IAEiG,EACjGC,IAGoB,EACpBC,MAEoB,KAalB;U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4","input","queueReader","pullL","pullR","handleSide","exit","fiber","pull","done","both","single","onDecision","decision","_tag","tsplus_module_3","io","ex","tsplus_module_10","cause","f","tsplus_module_8","r","tsplus_module_9","elem","tsplus_module_5","go","d","leftFiber","state","lj","left","rj","right","tsplus_module_7","leftEx","_","l","tsplus_module_2","rightEx","a","b","tsplus_module_14"],"sourceRoot":"","sources":["../../../_src/Channel/api/mergeWith.ts"],"sourcesContent":[null]}
|
@@ -26,11 +26,11 @@ function toPullInterpret(channelState, exec) {
|
|
26
26
|
case "Effect" /* ChannelStateTag.Effect */:
|
27
27
|
return tsplus_module_1.flatMap(() => toPullInterpret(exec.run(), exec), fileName_1 + ":27:41")(channelState.effect);
|
28
28
|
case "Emit" /* ChannelStateTag.Emit */:
|
29
|
-
return tsplus_module_1.succeed(() => tsplus_module_3.right(exec.getEmit()), fileName_1 + ":29:24");
|
29
|
+
return tsplus_module_1.succeed(() => tsplus_module_3.right(exec.getEmit(), fileName_1 + ":29:37"), fileName_1 + ":29:24");
|
30
30
|
case "Done" /* ChannelStateTag.Done */:
|
31
31
|
{
|
32
32
|
const done = exec.getDone();
|
33
|
-
return tsplus_module_4.match(tsplus_module_1.failCauseNow, outDone => tsplus_module_1.succeedNow(tsplus_module_3.left(outDone), fileName_1 + ":32:68"))(done);
|
33
|
+
return tsplus_module_4.match(tsplus_module_1.failCauseNow, outDone => tsplus_module_1.succeedNow(tsplus_module_3.left(outDone, fileName_1 + ":32:80"), fileName_1 + ":32:68"))(done);
|
34
34
|
}
|
35
35
|
case "Read" /* ChannelStateTag.Read */:
|
36
36
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"toPull.cjs","mappings":";;;;;;;;;;AAEA;AACA;AAA2F;AAAA;;AAG3F;;;;;AAKM,SAAUA,MAAM,CACpBC,IAAmE;EAEnE,OAAOC,oBAGAC,IAAI,IAAKD,4BAASE,eAAe,CAACD,IAAI,CAACE,GAAG,EAAE,EAAEF,IAAI,CAAC,wBAAC,wBA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AO,EAAE;QAC3B,OAAOC,oDAA6BC,OAAO,IAAKjB,2BAAcY,qBAAYK,OAAO,wBAAC,wBAAC,EAA5EH,IAAI,CAAyE;;IAEtF;MAA2B;QACzB,OAAO,iCAAY,EAACL,YAAY,EAAE,MAAMP,eAAe,CAACD,IAAI,CAACE,GAAG,EAAE,EAAEF,IAAI,CAAC,8BAAiB;;EAC3F;AAEL","names":["toPull","self","tsplus_module_1","exec","toPullInterpret","run","tsplus_module_2","ChannelExecutor","identity","exit","close","channelState","_tag","effect","tsplus_module_3","getEmit","done","getDone","tsplus_module_4","outDone"],"sourceRoot":"","sources":["../../../_src/Channel/api/toPull.ts"],"sourcesContent":[null]}
|