@fncts/io 0.0.41 → 0.0.43
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/Fiber/FiberRuntime.d.ts +2 -2
- package/Fiber/definition.d.ts +1 -0
- package/FiberSet.d.ts +66 -0
- package/Hub/definition.d.ts +3 -0
- package/Hub/internal.d.ts +1 -0
- package/IO/api/diffFiberRefs.d.ts +7 -0
- package/IO/api/timeout.d.ts +5 -0
- package/IO/api.d.ts +12 -1
- package/IO/definition.d.ts +18 -7
- package/IO.d.ts +1 -0
- package/Layer/api.d.ts +5 -0
- package/Queue/api/dimapIO.d.ts +5 -0
- package/Queue/api/filterInputIO.d.ts +1 -1
- package/Queue/api/filterOutputIO.d.ts +1 -0
- package/Queue/api/operations.d.ts +11 -0
- package/Queue/api/zipWithIO.d.ts +1 -0
- package/Queue/definition.d.ts +5 -0
- package/Queue/internal.d.ts +1 -0
- package/STM/definition.d.ts +1 -1
- package/Stream/api.d.ts +10 -0
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs +2 -8
- package/_cjs/Channel/api/mapOutConcurrentIO.cjs.map +1 -1
- package/_cjs/Channel/api/mergeAllWith.cjs +14 -23
- package/_cjs/Channel/api/mergeAllWith.cjs.map +1 -1
- package/_cjs/Channel/api/mergeWith.cjs +4 -16
- package/_cjs/Channel/api/mergeWith.cjs.map +1 -1
- package/_cjs/Channel/api.cjs +18 -33
- package/_cjs/Channel/api.cjs.map +1 -1
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs +2 -8
- package/_cjs/Channel/internal/SingleProducerAsyncInput.cjs.map +1 -1
- package/_cjs/Fiber/FiberRuntime.cjs +86 -75
- package/_cjs/Fiber/FiberRuntime.cjs.map +1 -1
- package/_cjs/Fiber/definition.cjs.map +1 -1
- package/_cjs/FiberSet.cjs +129 -0
- package/_cjs/FiberSet.cjs.map +1 -0
- package/_cjs/Hub/api.cjs +20 -11
- package/_cjs/Hub/api.cjs.map +1 -1
- package/_cjs/Hub/definition.cjs +3 -0
- package/_cjs/Hub/definition.cjs.map +1 -1
- package/_cjs/Hub/internal.cjs +65 -49
- package/_cjs/Hub/internal.cjs.map +1 -1
- package/_cjs/IO/api/asyncInterrupt.cjs +4 -7
- package/_cjs/IO/api/asyncInterrupt.cjs.map +1 -1
- package/_cjs/IO/api/diffFiberRefs.cjs +17 -0
- package/_cjs/IO/api/diffFiberRefs.cjs.map +1 -0
- package/_cjs/IO/api/memoize.cjs +7 -4
- package/_cjs/IO/api/memoize.cjs.map +1 -1
- package/_cjs/IO/api/timeout.cjs +8 -0
- package/_cjs/IO/api/timeout.cjs.map +1 -1
- package/_cjs/IO/api.cjs +33 -42
- package/_cjs/IO/api.cjs.map +1 -1
- package/_cjs/IO/definition.cjs +9 -3
- package/_cjs/IO/definition.cjs.map +1 -1
- package/_cjs/IO/runtime.cjs +3 -6
- package/_cjs/IO/runtime.cjs.map +1 -1
- package/_cjs/IO.cjs +11 -0
- package/_cjs/IO.cjs.map +1 -1
- package/_cjs/Layer/api.cjs +9 -5
- package/_cjs/Layer/api.cjs.map +1 -1
- package/_cjs/Push/api.cjs +1 -4
- package/_cjs/Push/api.cjs.map +1 -1
- package/_cjs/Queue/api/dimapIO.cjs +28 -10
- package/_cjs/Queue/api/dimapIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterInputIO.cjs +21 -9
- package/_cjs/Queue/api/filterInputIO.cjs.map +1 -1
- package/_cjs/Queue/api/filterOutputIO.cjs +28 -16
- package/_cjs/Queue/api/filterOutputIO.cjs.map +1 -1
- package/_cjs/Queue/api/operations.cjs +20 -0
- package/_cjs/Queue/api/operations.cjs.map +1 -1
- package/_cjs/Queue/api/zipWithIO.cjs +16 -9
- package/_cjs/Queue/api/zipWithIO.cjs.map +1 -1
- package/_cjs/Queue/definition.cjs.map +1 -1
- package/_cjs/Queue/internal.cjs +84 -54
- package/_cjs/Queue/internal.cjs.map +1 -1
- package/_cjs/Ref/Derived.cjs +8 -35
- package/_cjs/Ref/Derived.cjs.map +1 -1
- package/_cjs/Ref/DerivedAll.cjs +8 -35
- package/_cjs/Ref/DerivedAll.cjs.map +1 -1
- package/_cjs/STM/api/core-api.cjs +1 -4
- package/_cjs/STM/api/core-api.cjs.map +1 -1
- package/_cjs/STM/api.cjs +4 -16
- 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/Schedule/api.cjs +1 -7
- package/_cjs/Schedule/api.cjs.map +1 -1
- package/_cjs/Sink/api.cjs +1 -7
- package/_cjs/Sink/api.cjs.map +1 -1
- package/_cjs/Stream/api/zipAllWith.cjs +1 -4
- package/_cjs/Stream/api/zipAllWith.cjs.map +1 -1
- package/_cjs/Stream/api/zipWithChunks.cjs +1 -4
- package/_cjs/Stream/api/zipWithChunks.cjs.map +1 -1
- package/_cjs/Stream/api.cjs +51 -37
- package/_cjs/Stream/api.cjs.map +1 -1
- package/_cjs/TRef/definition.cjs +20 -74
- package/_cjs/TRef/definition.cjs.map +1 -1
- package/_cjs/internal/BackgroundScheduler.cjs +0 -1
- package/_cjs/internal/BackgroundScheduler.cjs.map +1 -1
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs +2 -8
- package/_mjs/Channel/api/mapOutConcurrentIO.mjs.map +1 -1
- package/_mjs/Channel/api/mergeAllWith.mjs +14 -23
- package/_mjs/Channel/api/mergeAllWith.mjs.map +1 -1
- package/_mjs/Channel/api/mergeWith.mjs +4 -16
- package/_mjs/Channel/api/mergeWith.mjs.map +1 -1
- package/_mjs/Channel/api.mjs +18 -33
- package/_mjs/Channel/api.mjs.map +1 -1
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs +2 -8
- package/_mjs/Channel/internal/SingleProducerAsyncInput.mjs.map +1 -1
- package/_mjs/Fiber/FiberRuntime.mjs +86 -75
- package/_mjs/Fiber/FiberRuntime.mjs.map +1 -1
- package/_mjs/Fiber/definition.mjs.map +1 -1
- package/_mjs/FiberSet.mjs +113 -0
- package/_mjs/FiberSet.mjs.map +1 -0
- package/_mjs/Hub/api.mjs +20 -11
- package/_mjs/Hub/api.mjs.map +1 -1
- package/_mjs/Hub/definition.mjs +3 -0
- package/_mjs/Hub/definition.mjs.map +1 -1
- package/_mjs/Hub/internal.mjs +65 -49
- package/_mjs/Hub/internal.mjs.map +1 -1
- package/_mjs/IO/api/asyncInterrupt.mjs +4 -7
- package/_mjs/IO/api/asyncInterrupt.mjs.map +1 -1
- package/_mjs/IO/api/diffFiberRefs.mjs +9 -0
- package/_mjs/IO/api/diffFiberRefs.mjs.map +1 -0
- package/_mjs/IO/api/memoize.mjs +7 -4
- package/_mjs/IO/api/memoize.mjs.map +1 -1
- package/_mjs/IO/api/timeout.mjs +7 -0
- package/_mjs/IO/api/timeout.mjs.map +1 -1
- package/_mjs/IO/api.mjs +30 -40
- package/_mjs/IO/api.mjs.map +1 -1
- package/_mjs/IO/definition.mjs +7 -2
- package/_mjs/IO/definition.mjs.map +1 -1
- package/_mjs/IO/runtime.mjs +3 -6
- package/_mjs/IO/runtime.mjs.map +1 -1
- package/_mjs/IO.mjs +1 -0
- package/_mjs/IO.mjs.map +1 -1
- package/_mjs/Layer/api.mjs +8 -5
- package/_mjs/Layer/api.mjs.map +1 -1
- package/_mjs/Push/api.mjs +1 -4
- package/_mjs/Push/api.mjs.map +1 -1
- package/_mjs/Queue/api/dimapIO.mjs +28 -10
- package/_mjs/Queue/api/dimapIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterInputIO.mjs +21 -9
- package/_mjs/Queue/api/filterInputIO.mjs.map +1 -1
- package/_mjs/Queue/api/filterOutputIO.mjs +28 -16
- package/_mjs/Queue/api/filterOutputIO.mjs.map +1 -1
- package/_mjs/Queue/api/operations.mjs +18 -0
- package/_mjs/Queue/api/operations.mjs.map +1 -1
- package/_mjs/Queue/api/zipWithIO.mjs +16 -9
- package/_mjs/Queue/api/zipWithIO.mjs.map +1 -1
- package/_mjs/Queue/definition.mjs.map +1 -1
- package/_mjs/Queue/internal.mjs +84 -54
- package/_mjs/Queue/internal.mjs.map +1 -1
- package/_mjs/Ref/Derived.mjs +8 -35
- package/_mjs/Ref/Derived.mjs.map +1 -1
- package/_mjs/Ref/DerivedAll.mjs +8 -35
- package/_mjs/Ref/DerivedAll.mjs.map +1 -1
- package/_mjs/STM/api/core-api.mjs +1 -4
- package/_mjs/STM/api/core-api.mjs.map +1 -1
- package/_mjs/STM/api.mjs +4 -16
- 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/Schedule/api.mjs +1 -7
- package/_mjs/Schedule/api.mjs.map +1 -1
- package/_mjs/Sink/api.mjs +1 -7
- package/_mjs/Sink/api.mjs.map +1 -1
- package/_mjs/Stream/api/zipAllWith.mjs +1 -4
- package/_mjs/Stream/api/zipAllWith.mjs.map +1 -1
- package/_mjs/Stream/api/zipWithChunks.mjs +1 -4
- package/_mjs/Stream/api/zipWithChunks.mjs.map +1 -1
- package/_mjs/Stream/api.mjs +47 -36
- package/_mjs/Stream/api.mjs.map +1 -1
- package/_mjs/TRef/definition.mjs +20 -74
- package/_mjs/TRef/definition.mjs.map +1 -1
- package/_mjs/internal/BackgroundScheduler.mjs +0 -1
- package/_mjs/internal/BackgroundScheduler.mjs.map +1 -1
- package/_src/Channel/api/mapOutConcurrentIO.ts +5 -5
- package/_src/Channel/api/mergeAllWith.ts +9 -9
- package/_src/Channel/api/mergeWith.ts +16 -16
- package/_src/Channel/api.ts +12 -32
- package/_src/Channel/internal/SingleProducerAsyncInput.ts +2 -2
- package/_src/Fiber/FiberRuntime.ts +50 -36
- package/_src/Fiber/definition.ts +2 -0
- package/_src/FiberSet.ts +115 -0
- package/_src/Hub/api.ts +15 -6
- package/_src/Hub/definition.ts +6 -0
- package/_src/Hub/internal.ts +19 -0
- package/_src/IO/api/asyncInterrupt.ts +4 -4
- package/_src/IO/api/diffFiberRefs.ts +11 -0
- package/_src/IO/api/memoize.ts +5 -3
- package/_src/IO/api/timeout.ts +8 -0
- package/_src/IO/api.ts +32 -19
- package/_src/IO/definition.ts +20 -4
- package/_src/IO/runtime.ts +3 -6
- package/_src/IO.ts +1 -0
- package/_src/Layer/api.ts +11 -4
- package/_src/Push/api.ts +4 -4
- package/_src/Queue/api/dimapIO.ts +25 -0
- package/_src/Queue/api/filterInputIO.ts +16 -0
- package/_src/Queue/api/filterOutputIO.ts +16 -0
- package/_src/Queue/api/operations.ts +20 -0
- package/_src/Queue/api/zipWithIO.ts +8 -0
- package/_src/Queue/definition.ts +4 -0
- package/_src/Queue/internal.ts +32 -0
- package/_src/Ref/Derived.ts +18 -20
- package/_src/Ref/DerivedAll.ts +18 -21
- package/_src/STM/api/core-api.ts +1 -1
- package/_src/STM/api.ts +4 -4
- package/_src/STM/definition.ts +1 -1
- package/_src/Schedule/api.ts +8 -8
- package/_src/Sink/api.ts +8 -8
- package/_src/Stream/api/zipAllWith.ts +4 -4
- package/_src/Stream/api/zipWithChunks.ts +4 -4
- package/_src/Stream/api.ts +75 -22
- package/_src/TRef/definition.ts +33 -36
- package/_src/global.ts +4 -0
- package/_src/index.ts +1 -0
- package/_src/internal/BackgroundScheduler.ts +0 -1
- package/global.d.ts +4 -0
- package/index.d.ts +1 -0
- package/package.json +4 -4
package/Fiber/FiberRuntime.d.ts
CHANGED
@@ -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 _ioOpCode = IOTag.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 _ioOpCode = IOTag.UpdateTrace;
|
36
36
|
constructor(trace?: string | undefined);
|
37
37
|
}
|
38
38
|
export type Continuation = OnSuccess | OnSuccessAndFailure | OnFailure | WhileLoop | UpdateTrace | RevertFlags;
|
package/Fiber/definition.d.ts
CHANGED
@@ -76,6 +76,7 @@ export interface RuntimeFiber<E, A> extends FiberCommon<E, A> {
|
|
76
76
|
* The trace of the Fiber
|
77
77
|
*/
|
78
78
|
readonly trace: UIO<Trace>;
|
79
|
+
addObserver(observer: (exit: Exit<E, A>) => void): void;
|
79
80
|
}
|
80
81
|
export declare class SyntheticFiber<E, A> implements FiberCommon<E, A> {
|
81
82
|
readonly id: FiberId;
|
package/FiberSet.d.ts
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
import { Fiber } from "@fncts/io/Fiber/definition";
|
2
|
+
import { Future } from "@fncts/io/Future";
|
3
|
+
import { IO, UIO, FIO } from "@fncts/io/IO/definition";
|
4
|
+
import { Scope } from "@fncts/io/Scope/definition";
|
5
|
+
export declare const FiberSetTypeId: unique symbol;
|
6
|
+
export type FiberSetTypeId = typeof FiberSetTypeId;
|
7
|
+
/**
|
8
|
+
* @tsplus type fncts.io.FiberSet
|
9
|
+
* @tsplus companion fncts.io.FiberSetOps
|
10
|
+
*/
|
11
|
+
export declare class FiberSet<E, A> {
|
12
|
+
readonly backing: Set<Fiber.Runtime<E, A>>;
|
13
|
+
readonly future: Future<unknown, never>;
|
14
|
+
readonly [FiberSetTypeId]: FiberSetTypeId;
|
15
|
+
constructor(backing: Set<Fiber.Runtime<E, A>>, future: Future<unknown, never>);
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* @tsplus static fncts.io.FiberSetOps unsafeMake
|
19
|
+
* @tsplus location "@fncts/io/FiberSet"
|
20
|
+
*/
|
21
|
+
export declare function unsafeMake<E, A>(backing: Set<Fiber.Runtime<E, A>>, future: Future<unknown, never>): FiberSet<E, A>;
|
22
|
+
/**
|
23
|
+
* @tsplus static fncts.io.FiberSetOps make
|
24
|
+
* @tsplus location "@fncts/io/FiberSet"
|
25
|
+
*/
|
26
|
+
export declare function make<E, A>(): IO<Scope, never, FiberSet<E, A>>;
|
27
|
+
/**
|
28
|
+
* @tsplus static fncts.io.FiberSetOps makeRuntime
|
29
|
+
* @tsplus location "@fncts/io/FiberSet"
|
30
|
+
*/
|
31
|
+
export declare function makeRuntime<R, E, A>(): IO<Scope | R, never, <XE extends E, XA extends A>(io: IO<R, XE, XA>) => Fiber.Runtime<XE, XA>>;
|
32
|
+
/**
|
33
|
+
* @tsplus pipeable fncts.io.FiberSet unsafeAdd
|
34
|
+
* @tsplus location "@fncts/io/FiberSet"
|
35
|
+
*/
|
36
|
+
export declare function unsafeAdd<XE extends E, XA extends A, E, A>(fiber: Fiber.Runtime<XE, XA>): (self: FiberSet<E, A>) => void;
|
37
|
+
/**
|
38
|
+
* @tsplus pipeable fncts.io.FiberSet add
|
39
|
+
* @tsplus location "@fncts/io/FiberSet"
|
40
|
+
*/
|
41
|
+
export declare function add<XE extends E, XA extends A, E, A>(fiber: Fiber.Runtime<XE, XA>): (self: FiberSet<E, A>) => import("./IO").UIO<void>;
|
42
|
+
/**
|
43
|
+
* @tsplus pipeable fncts.io.FiberSet runtime
|
44
|
+
* @tsplus location "@fncts/io/FiberSet"
|
45
|
+
*/
|
46
|
+
export declare function runtime<R = never>(): <E, A>(self: FiberSet<E, A>) => import("./IO").IO<R, never, <XE extends E, XA extends A>(io: import("./IO").IO<R, XE, XA>) => import("./Fiber").Fiber.Runtime<XE, XA>>;
|
47
|
+
/**
|
48
|
+
* @tsplus pipeable fncts.io.FiberSet run
|
49
|
+
* @tsplus location "@fncts/io/FiberSet"
|
50
|
+
*/
|
51
|
+
export declare function run<R, XE extends E, XA extends A, E, A>(io: IO<R, XE, XA>): (self: FiberSet<E, A>) => IO<R, never, Fiber.Runtime<XE, XA>>;
|
52
|
+
/**
|
53
|
+
* @tsplus getter fncts.io.FiberSet size
|
54
|
+
* @tsplus location "@fncts/io/FiberSet"
|
55
|
+
*/
|
56
|
+
export declare function size<E, A>(self: FiberSet<E, A>): UIO<number>;
|
57
|
+
/**
|
58
|
+
* @tsplus getter fncts.io.FiberSet join
|
59
|
+
* @tsplus location "@fncts/io/FiberSet"
|
60
|
+
*/
|
61
|
+
export declare function join<E, A>(self: FiberSet<E, A>): FIO<E, never>;
|
62
|
+
/**
|
63
|
+
* @tsplus getter fncts.io.FiberSet clear
|
64
|
+
* @tsplus location "@fncts/io/FiberSet"
|
65
|
+
*/
|
66
|
+
export declare function clear<E, A>(self: FiberSet<E, A>): UIO<void>;
|
package/Hub/definition.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { UIO } from "@fncts/io/IO/definition";
|
2
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
2
3
|
import { Scope } from "@fncts/io/Scope/definition";
|
3
4
|
import type { IO } from "@fncts/io/IO";
|
4
5
|
import type { PDequeue, PEnqueue, PEnqueueInternal } from "@fncts/io/Queue";
|
@@ -73,6 +74,7 @@ export declare abstract class PHubInternal<RA, RB, EA, EB, A, B> implements PHub
|
|
73
74
|
* Checks whether the hub is shut down.
|
74
75
|
*/
|
75
76
|
abstract isShutdown: UIO<boolean>;
|
77
|
+
abstract unsafeSize: Maybe<number>;
|
76
78
|
/**
|
77
79
|
* Publishes a message to the hub, returning whether the message was
|
78
80
|
* published to the hub.
|
@@ -97,6 +99,7 @@ export declare abstract class PHubInternal<RA, RB, EA, EB, A, B> implements PHub
|
|
97
99
|
* message from the hub each time.
|
98
100
|
*/
|
99
101
|
abstract subscribe: IO<Scope, never, PDequeue<RA, RB, EA, EB, A, B>>;
|
102
|
+
unsafeOffer(_: never): boolean;
|
100
103
|
offer(a: A, __tsplusTrace?: string): IO<RA, EA, boolean>;
|
101
104
|
offerAll(as: Iterable<A>, __tsplusTrace?: string): IO<RA, EA, boolean>;
|
102
105
|
}
|
package/Hub/internal.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Future } from "@fncts/io/Future";
|
2
2
|
import { UIO, IO } from "@fncts/io/IO/definition";
|
3
|
+
import { Nothing, Just } from "@fncts/base/data/Maybe/definition";
|
3
4
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
4
5
|
import { Queue } from "@fncts/io/Queue/definition";
|
5
6
|
import { Scope } from "@fncts/io/Scope/definition";
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { IO } from "@fncts/io/IO/definition";
|
2
|
+
import { FiberRefsPatch } from "@fncts/io/FiberRefs";
|
3
|
+
/**
|
4
|
+
* @tsplus getter fncts.io.IO diffFiberRefs
|
5
|
+
* @tsplus location "@fncts/io/IO/api/diffFiberRefs"
|
6
|
+
*/
|
7
|
+
export declare function diffFiberRefs<R, E, A>(self: IO<R, E, A>, __tsplusTrace?: string): IO<R, E, readonly [FiberRefsPatch, A]>;
|
package/IO/api/timeout.d.ts
CHANGED
@@ -7,6 +7,11 @@ import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
7
7
|
* @tsplus location "@fncts/io/IO/api/timeout"
|
8
8
|
*/
|
9
9
|
export declare function timeoutTo<A, B, B1>(duration: Lazy<Duration>, b: Lazy<B>, f: (a: A) => B1, __tsplusTrace?: string): <R, E>(self: IO<R, E, A>) => IO<R, E, B | B1>;
|
10
|
+
/**
|
11
|
+
* @tsplus pipeable fncts.io.IO timeoutFail
|
12
|
+
* @tsplus location "@fncts/io/IO/api/timeout"
|
13
|
+
*/
|
14
|
+
export declare function timeoutFail<E1>(duration: Lazy<Duration>, b: Lazy<E1>): <R, E, A>(self: IO<R, E, A>) => IO<R, E | E1, A>;
|
10
15
|
/**
|
11
16
|
* @tsplus pipeable fncts.io.IO timeout
|
12
17
|
* @tsplus location "@fncts/io/IO/api/timeout"
|
package/IO/api.d.ts
CHANGED
@@ -12,11 +12,12 @@ import { NonEmptyArray } from "@fncts/base/collection/immutable/ImmutableNonEmpt
|
|
12
12
|
import { Eval } from "@fncts/base/control/Eval/definition";
|
13
13
|
import { Exit } from "@fncts/base/data/Exit/definition";
|
14
14
|
import { NoSuchElementError } from "@fncts/base/data/exceptions";
|
15
|
+
import { FiberRefs } from "@fncts/io/FiberRefs";
|
15
16
|
import { Trace } from "@fncts/base/data/Trace/definition";
|
16
17
|
import { List } from "@fncts/base/collection/immutable/List/definition";
|
17
18
|
import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
|
18
|
-
import { FiberRefs } from "@fncts/io/FiberRefs";
|
19
19
|
import type { Running } from "../FiberStatus.js";
|
20
|
+
import type { ShowOptions } from "@fncts/base/data/Showable.js";
|
20
21
|
import type * as P from "@fncts/base/typeclass";
|
21
22
|
import type { _E, _R } from "@fncts/base/types";
|
22
23
|
import type { FiberRuntime } from "@fncts/io/Fiber/FiberRuntime";
|
@@ -479,6 +480,11 @@ export declare function getOrFailWith<E, A>(maybe: Maybe<A>, onNothing: Lazy<E>,
|
|
479
480
|
* @tsplus location "@fncts/io/IO/api"
|
480
481
|
*/
|
481
482
|
export declare function getOrFailUnit<A>(option: Maybe<A>, __tsplusTrace?: string): FIO<void, A>;
|
483
|
+
/**
|
484
|
+
* @tsplus static fncts.io.IOOps getFiberRefs
|
485
|
+
* @tsplus location "@fncts/io/IO/api"
|
486
|
+
*/
|
487
|
+
export declare function getFiberRefs(__tsplusTrace?: string): UIO<FiberRefs>;
|
482
488
|
/**
|
483
489
|
* Creates an `IO` that halts with the specified lazily-evaluated defect.
|
484
490
|
* This method can be used for terminating a fiber because a defect has been
|
@@ -554,6 +560,11 @@ export declare function just<R, E, A>(self: IO<R, E, Maybe<A>>): IO<R, Maybe<E>,
|
|
554
560
|
* @tsplus location "@fncts/io/IO/api"
|
555
561
|
*/
|
556
562
|
export declare function log(message: Lazy<string>, __tsplusTrace?: string): UIO<void>;
|
563
|
+
/**
|
564
|
+
* @tsplus static fncts.io.IOOps show
|
565
|
+
* @tsplus location "@fncts/io/IO/api"
|
566
|
+
*/
|
567
|
+
export declare function show(message: Lazy<unknown>, options?: Partial<ShowOptions>, __tsplusTrace?: string): UIO<void>;
|
557
568
|
/**
|
558
569
|
* Loops with the specified effectual function, collecting the results into a
|
559
570
|
* list. The moral equivalent of:
|
package/IO/definition.d.ts
CHANGED
@@ -67,7 +67,7 @@ declare module "@fncts/base/data/Exit/definition" {
|
|
67
67
|
}
|
68
68
|
}
|
69
69
|
declare module "@fncts/base/data/Tag/definition" {
|
70
|
-
interface Tag<T, Identifier = T> extends IO<
|
70
|
+
interface Tag<T, Identifier = T> extends IO<T, never, T> {
|
71
71
|
}
|
72
72
|
}
|
73
73
|
/**
|
@@ -121,19 +121,20 @@ export declare const enum IOTag {
|
|
121
121
|
YieldNow = 12,
|
122
122
|
Commit = 13,
|
123
123
|
RevertFlags = 14,
|
124
|
-
UpdateTrace = 15
|
124
|
+
UpdateTrace = 15,
|
125
|
+
External = 16
|
125
126
|
}
|
126
127
|
export type IOOp<Tag extends string | number, Body = {}> = IO<never, never, never> & Body & {
|
127
|
-
readonly
|
128
|
+
readonly _ioOpCode: Tag;
|
128
129
|
};
|
129
130
|
export declare class IOPrimitive {
|
130
|
-
readonly
|
131
|
+
readonly _ioOpCode: unknown;
|
131
132
|
i0: any;
|
132
133
|
i1: any;
|
133
134
|
i2: any;
|
134
135
|
trace: string | undefined;
|
135
|
-
[IOTypeId]:
|
136
|
-
constructor(
|
136
|
+
readonly [IOTypeId]: IOTypeId;
|
137
|
+
constructor(_ioOpCode: unknown);
|
137
138
|
}
|
138
139
|
export declare function isIO(u: unknown): u is IO<any, any, any>;
|
139
140
|
export interface Sync<A = any> extends IOOp<IOTag.Sync, {
|
@@ -207,7 +208,7 @@ export interface Fail extends IOOp<IOTag.Fail, {
|
|
207
208
|
readonly trace: string | undefined;
|
208
209
|
}> {
|
209
210
|
}
|
210
|
-
export type Primitive = OnSuccessAndFailure | OnFailure | OnSuccess | UpdateRuntimeFlagsWithin | Sync | Async | SucceedNow | UpdateRuntimeFlags | GenerateStackTrace | Stateful | WhileLoop | YieldNow | Fail | STM<any, any, any> | Left<any> | Right<any> | Nothing | Just<any> | Failure<any> | Success<any> | Tag<any>;
|
211
|
+
export type Primitive = OnSuccessAndFailure | OnFailure | OnSuccess | UpdateRuntimeFlagsWithin | Sync | Async | SucceedNow | UpdateRuntimeFlags | GenerateStackTrace | Stateful | WhileLoop | YieldNow | Fail | External<any, any, any> | STM<any, any, any> | Left<any> | Right<any> | Nothing | Just<any> | Failure<any> | Success<any> | Tag<any>;
|
211
212
|
/**
|
212
213
|
* @tsplus static fncts.io.IOOps concrete
|
213
214
|
* @tsplus macro identity
|
@@ -216,3 +217,13 @@ export type Primitive = OnSuccessAndFailure | OnFailure | OnSuccess | UpdateRunt
|
|
216
217
|
export declare function concrete(io: IO<any, any, any>): Primitive;
|
217
218
|
export type EvaluationStep = OnSuccessAndFailure | OnFailure | OnSuccess;
|
218
219
|
export type Canceler<R> = URIO<R, void>;
|
220
|
+
export declare abstract class External<R, E, A> extends IOPrimitive implements IO<R, E, A> {
|
221
|
+
_ioOpCode: IOTag.External;
|
222
|
+
[IOVariance]: {
|
223
|
+
_R: () => R;
|
224
|
+
_E: () => E;
|
225
|
+
_A: () => A;
|
226
|
+
};
|
227
|
+
constructor();
|
228
|
+
abstract toIO: IO<R, E, A>;
|
229
|
+
}
|
package/IO.d.ts
CHANGED
@@ -44,6 +44,7 @@ export * from "./IO/api/foreachConcurrent.js";
|
|
44
44
|
export * from "./IO/api/environment.js";
|
45
45
|
export * from "./IO/api/ensuringChildren.js";
|
46
46
|
export * from "./IO/api/disconnect.js";
|
47
|
+
export * from "./IO/api/diffFiberRefs.js";
|
47
48
|
export * from "./IO/api/descriptor.js";
|
48
49
|
export * from "./IO/api/delay.js";
|
49
50
|
export * from "./IO/api/daemonChildren.js";
|
package/Layer/api.d.ts
CHANGED
@@ -162,6 +162,11 @@ export declare function passthrough<RIn extends Spreadable, E, ROut extends Spre
|
|
162
162
|
* @tsplus location "@fncts/io/Layer/api"
|
163
163
|
*/
|
164
164
|
export declare function retry<E, S, RIn1>(schedule: Schedule.WithState<S, RIn1, E, any>, __tsplusTrace?: string): <RIn, ROut>(self: Layer<RIn, E, ROut>) => Layer<RIn | RIn1, E, ROut>;
|
165
|
+
/**
|
166
|
+
* @tsplus static fncts.io.LayerOps scopedDiscard
|
167
|
+
* @tsplus location "@fncts/io/Layer/api"
|
168
|
+
*/
|
169
|
+
export declare function scopedDiscard<R, E, A>(io: Lazy<IO<R, E, A>>, __tsplusTrace?: string): Layer<Exclude<R, Scope>, E, never>;
|
165
170
|
/**
|
166
171
|
* @tsplus static fncts.io.LayerOps scoped
|
167
172
|
* @tsplus location "@fncts/io/Layer/api"
|
package/Queue/api/dimapIO.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { IO } from "@fncts/io/IO/definition";
|
2
2
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
3
3
|
import { PQueue } from "@fncts/io/Queue/definition";
|
4
|
+
import type { Maybe } from "@fncts/base/data/Maybe";
|
4
5
|
import type { UIO } from "@fncts/io/IO";
|
5
6
|
import type { PDequeue, PDequeueInternal, PEnqueue, PEnqueueInternal } from "@fncts/io/Queue/definition";
|
6
7
|
import { DequeueTypeId, EnqueueTypeId, QueueTypeId, QueueVariance } from "@fncts/io/Queue/definition";
|
@@ -59,6 +60,8 @@ declare class ContramapIO<RA, RB, EA, EB, A, B, RC, EC, C> implements PEnqueueIn
|
|
59
60
|
awaitShutdown: UIO<void>;
|
60
61
|
capacity: number;
|
61
62
|
isShutdown: UIO<boolean>;
|
63
|
+
get unsafeSize(): Maybe<number>;
|
64
|
+
unsafeOffer(a: C): boolean;
|
62
65
|
offer(c: C): IO<RC | RA, EA | EC, boolean>;
|
63
66
|
offerAll(cs: Iterable<C>): IO<RC | RA, EC | EA, boolean>;
|
64
67
|
shutdown: UIO<void>;
|
@@ -89,6 +92,8 @@ declare class MapIO<RA, RB, EA, EB, A, B, RC, EC, C> implements PDequeueInternal
|
|
89
92
|
isShutdown: UIO<boolean>;
|
90
93
|
shutdown: UIO<void>;
|
91
94
|
size: UIO<number>;
|
95
|
+
get unsafeSize(): Maybe<number>;
|
96
|
+
unsafeOffer(a: C): boolean;
|
92
97
|
take: IO<RB | RC, EB | EC, C>;
|
93
98
|
takeAll: IO<RB | RC, EB | EC, Conc<C>>;
|
94
99
|
takeUpTo(n: number): IO<RB | RC, EB | EC, Conc<C>>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IO, UIO } from "@fncts/io/IO/definition";
|
2
|
-
import { Just, Nothing } from "@fncts/base/data/Maybe/definition";
|
2
|
+
import { Maybe, Just, Nothing } from "@fncts/base/data/Maybe/definition";
|
3
3
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
4
4
|
import { PQueue } from "@fncts/io/Queue/definition";
|
5
5
|
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { IO, UIO } from "@fncts/io/IO/definition";
|
2
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
2
3
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
3
4
|
import { PQueue } from "@fncts/io/Queue/definition";
|
4
5
|
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
@@ -21,6 +21,12 @@ export declare function capacity<RA, RB, EA, EB, A, B>(queue: PQueueCommon<RA, R
|
|
21
21
|
* @tsplus location "@fncts/io/Queue/api/operations"
|
22
22
|
*/
|
23
23
|
export declare function isShutdown<RA, RB, EA, EB, A, B>(queue: PQueueCommon<RA, RB, EA, EB, A, B>, __tsplusTrace?: string): UIO<boolean>;
|
24
|
+
/**
|
25
|
+
* Places one value in the queue.
|
26
|
+
* @tsplus pipeable fncts.io.Queue unsafeOffer
|
27
|
+
* @tsplus location "@fncts/io/Queue/api/operations"
|
28
|
+
*/
|
29
|
+
export declare function unsafeOffer<A>(a: A, __tsplusTrace?: string): <RA, RB, EA, EB, B>(queue: PEnqueue<RA, RB, EA, EB, A, B>) => boolean;
|
24
30
|
/**
|
25
31
|
* Places one value in the queue.
|
26
32
|
* @tsplus pipeable fncts.io.Queue offer
|
@@ -61,6 +67,11 @@ export declare function shutdown<RA, RB, EA, EB, A, B>(queue: PQueueCommon<RA, R
|
|
61
67
|
* @tsplus location "@fncts/io/Queue/api/operations"
|
62
68
|
*/
|
63
69
|
export declare function size<RA, RB, EA, EB, A, B>(queue: PQueueCommon<RA, RB, EA, EB, A, B>, __tsplusTrace?: string): import("../../IO").UIO<number>;
|
70
|
+
/**
|
71
|
+
* @tsplus getter fncts.io.Queue unsafeSize
|
72
|
+
* @tsplus location "@fncts/io/Queue/api/operations"
|
73
|
+
*/
|
74
|
+
export declare function unsafeSize<RA, RB, EA, EB, A, B>(queue: PQueueCommon<RA, RB, EA, EB, A, B>, __tsplusTrace?: string): import("@fncts/base/data/Maybe").Maybe<number>;
|
64
75
|
/**
|
65
76
|
* Removes the oldest value in the queue. If the queue is empty, this will
|
66
77
|
* return a computation that resumes when an item has been added to the queue.
|
package/Queue/api/zipWithIO.d.ts
CHANGED
package/Queue/definition.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { UIO, IO } from "@fncts/io/IO/definition";
|
2
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
2
3
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
3
4
|
export declare const EnqueueTypeId: unique symbol;
|
4
5
|
export type EnqueueTypeId = typeof EnqueueTypeId;
|
@@ -93,6 +94,7 @@ export declare abstract class QueueInternal<RA, RB, EA, EB, A, B> implements PQu
|
|
93
94
|
* `true` if `shutdown` has been called.
|
94
95
|
*/
|
95
96
|
abstract readonly isShutdown: UIO<boolean>;
|
97
|
+
abstract unsafeOffer(a: A): boolean;
|
96
98
|
/**
|
97
99
|
* Places one value in the queue.
|
98
100
|
*/
|
@@ -120,6 +122,7 @@ export declare abstract class QueueInternal<RA, RB, EA, EB, A, B> implements PQu
|
|
120
122
|
* Future calls to `offer*` and `take*` will be interrupted immediately.
|
121
123
|
*/
|
122
124
|
abstract readonly shutdown: UIO<void>;
|
125
|
+
abstract readonly unsafeSize: Maybe<number>;
|
123
126
|
/**
|
124
127
|
* Retrieves the size of the queue, which is equal to the number of elements
|
125
128
|
* in the queue. This may be negative if fibers are suspended waiting for
|
@@ -190,6 +193,7 @@ export interface PQueueCommonInternal<RA, RB, EA, EB, A, B> {
|
|
190
193
|
* Future calls to `offer*` and `take*` will be interrupted immediately.
|
191
194
|
*/
|
192
195
|
readonly shutdown: UIO<void>;
|
196
|
+
readonly unsafeSize: Maybe<number>;
|
193
197
|
/**
|
194
198
|
* Retrieves the size of the queue, which is equal to the number of elements
|
195
199
|
* in the queue. This may be negative if fibers are suspended waiting for
|
@@ -199,6 +203,7 @@ export interface PQueueCommonInternal<RA, RB, EA, EB, A, B> {
|
|
199
203
|
}
|
200
204
|
export interface PEnqueueInternal<RA, RB, EA, EB, A, B> extends PQueueCommonInternal<RA, RB, EA, EB, A, B> {
|
201
205
|
readonly [EnqueueTypeId]: EnqueueTypeId;
|
206
|
+
unsafeOffer(a: A): boolean;
|
202
207
|
/**
|
203
208
|
* Places one value in the queue.
|
204
209
|
*/
|
package/Queue/internal.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Future } from "@fncts/io/Future";
|
2
2
|
import { UIO, IO } from "@fncts/io/IO/definition";
|
3
|
+
import { Maybe, Nothing, Just } from "@fncts/base/data/Maybe/definition";
|
3
4
|
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
4
5
|
import { Queue } from "@fncts/io/Queue/definition";
|
5
6
|
import type { MutableQueue } from "@fncts/io/internal/MutableQueue";
|
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 _ioOpCode = IOTag.Commit;
|
26
26
|
readonly trace?: string;
|
27
27
|
readonly [STMTypeId]: STMTypeId;
|
28
28
|
[IOVariance]: {
|
package/Stream/api.d.ts
CHANGED
@@ -529,6 +529,11 @@ export declare function fromChunkNow<O>(c: Conc<O>, __tsplusTrace?: string): Str
|
|
529
529
|
* @tsplus location "@fncts/io/Stream/api"
|
530
530
|
*/
|
531
531
|
export declare function fromChunk<O>(c: Lazy<Conc<O>>, __tsplusTrace?: string): Stream<never, never, O>;
|
532
|
+
/**
|
533
|
+
* @tsplus static fncts.io.StreamOps fromReadableStream
|
534
|
+
* @tsplus location "@fncts/io/Stream/api"
|
535
|
+
*/
|
536
|
+
export declare function fromReadableStream<A, E>(evaluate: Lazy<ReadableStream<A>>, onError: (error: unknown) => E): Stream<never, E, A>;
|
532
537
|
/**
|
533
538
|
* Creates a single-valued stream from a managed resource
|
534
539
|
* @tsplus static fncts.io.StreamOps scoped
|
@@ -1147,6 +1152,11 @@ export declare function toQueueSliding(capacity?: number, __tsplusTrace?: string
|
|
1147
1152
|
* @tsplus location "@fncts/io/Stream/api"
|
1148
1153
|
*/
|
1149
1154
|
export declare function toQueueUnbounded<R, E, A>(stream: Stream<R, E, A>, __tsplusTrace?: string): IO<R | Scope, never, Queue<Take<E, A>>>;
|
1155
|
+
/**
|
1156
|
+
* @tsplus getter fncts.io.Stream toReadableStream
|
1157
|
+
* @tsplus location "@fncts/io/Stream/api"
|
1158
|
+
*/
|
1159
|
+
export declare function toReadableStream<E, A>(self: Stream<never, E, A>, __tsplusTrace?: string): ReadableStream<A>;
|
1150
1160
|
/**
|
1151
1161
|
* Creates a stream by effectfully peeling off the "layers" of a value of type `S`
|
1152
1162
|
* @tsplus static fncts.io.StreamOps unfoldChunkIO
|
@@ -32,15 +32,9 @@ const fileName_1 = "(@fncts/io) src/Channel/api/mapOutConcurrentIO.ts";
|
|
32
32
|
function mapOutConcurrentIO(n, f) {
|
33
33
|
return self => {
|
34
34
|
return tsplus_module_2.unwrapScoped(() => tsplus_module_5.map(queue => {
|
35
|
-
const consumer = tsplus_module_2.unwrap(() => tsplus_module_5.matchCause(tsplus_module_1.failCauseNow, r => tsplus_module_3.match(
|
36
|
-
Left: tsplus_module_1.endNow,
|
37
|
-
Right: outElem => tsplus_module_1.zipRight(consumer)(tsplus_module_2.writeNow(outElem))
|
38
|
-
})(r), fileName_1 + ":58:42")(tsplus_module_5.flatten(tsplus_module_4.take(queue, fileName_1 + ":58:18"), fileName_1 + ":58:23")));
|
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")));
|
39
36
|
return consumer;
|
40
|
-
}, 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(
|
41
|
-
Left: 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"),
|
42
|
-
Right: 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"))
|
43
|
-
})(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")));
|
44
38
|
};
|
45
39
|
}
|
46
40
|
//# sourceMappingURL=mapOutConcurrentIO.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mapOutConcurrentIO.cjs","names":["mapOutConcurrentIO","n","f","self","tsplus_module_2","unwrapScoped","tsplus_module_5","map","queue","consumer","unwrap","matchCause","tsplus_module_1","failCauseNow","r","tsplus_module_3","match","
|
1
|
+
{"version":3,"file":"mapOutConcurrentIO.cjs","names":["mapOutConcurrentIO","n","f","self","tsplus_module_2","unwrapScoped","tsplus_module_5","map","queue","consumer","unwrap","matchCause","tsplus_module_1","failCauseNow","r","tsplus_module_3","match","endNow","outElem","zipRight","writeNow","fileName_1","flatten","tsplus_module_4","take","tsplus_module_19","withChildren","getChildren","flatMap","errorSignal","permits","pull","tsplus_module_12","fork","tsplus_module_7","uninterruptible","forever","matchCauseIO","cause","offer","outDone","asUnit","succeedNow","tsplus_module_6","left","interruptible","withPermits","unit","p","latch","tsplus_module_8","wait","withPermit","tsplus_module_10","fulfill","tapErrorCause","c","failCause","tsplus_module_9","raceFirst","succeed_","undefined","right","tsplus_module_11","make","tsplus_module_13","toPull","tsplus_module_14","makeSemaphore","tsplus_module_16","acquireRelease","tsplus_module_15","makeBounded","shutdown","tsplus_module_18","addFinalizer","tsplus_module_17","interruptAll"],"sources":["../../../_src/Channel/api/mapOutConcurrentIO.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;A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AAzC,UAAA,aAAA6B,eAAA,CAAAC,IAAA,CAAAH,CAAC,EAAA3B,UAAA,aAAwB,EAAAA,UAAA,aAArCb,KAAK,CAAiC,GAAAa,UAAA,aADxB0C,gBAAA,CAAAC,IAAA,CAAA3C,UAAA,YAA0B,GAAAA,UAAA,aAD1B0C,gBAAA,CAAAC,IAAA,CAAA3C,UAAA,YAAgC,CAchD,EArBNP,CAAC,CAsBA,EAAAO,UAAA,aAzBLU,IAAI,CA0BH,EAAAV,UAAA,cAAAA,UAAA,cAAAA,UAAA,eAAAA,UAAA,aAAA4C,gBAAA,CAAAC,MAAA,CA5BmB/D,IAAI,IAAAkB,UAAA,aADJ8C,gBAAA,CAAAC,aAAA,CAAUnE,CAAC,EAAAoB,UAAA,YAAC,GAAAA,UAAA,aADZ0C,gBAAA,CAAAC,IAAA,CAAA3C,UAAA,YAA6B,GAAAA,UAAA,aALjDgD,gBAAA,CAAAC,cAAA,OACEC,gBAAA,CAAAC,WAAA,CAAyEvE,CAAC,EAAAoB,UAAA,YAAC,EAC1Eb,KAAK,IAAIe,eAAA,CAAAkD,QAAA,CAACjE,KAAK,EAAAa,UAAA,YAAS,EAAAA,UAAA,YAC1B,GAAAA,UAAA,aALDqD,gBAAA,CAAAC,YAAA,OAAgBrE,eAAA,CAAAsB,OAAA,CAAAgD,gBAAA,CAAAC,YAAA,EAAAxD,UAAA,aAAAM,WAAW,CAA4B,EAAAN,UAAA,YAAC,CAwC1D,EAAAA,UAAA,YACH,CAQC,CACH;EACH,CAAC;AACH"}
|
@@ -40,31 +40,22 @@ const fileName_1 = "(@fncts/io) src/Channel/api/mergeAllWith.ts";
|
|
40
40
|
function mergeAllWith(n, f, bufferSize = 16, mergeStrategy = "BackPressure") {
|
41
41
|
return channels => {
|
42
42
|
return tsplus_module_2.unwrapScoped(() => tsplus_module_5.map(queue => {
|
43
|
-
const consumer = tsplus_module_2.unwrap(() => tsplus_module_5.matchCause(tsplus_module_1.failCauseNow, out => tsplus_module_3.match(
|
44
|
-
Left: tsplus_module_1.endNow,
|
45
|
-
Right: outElem => tsplus_module_1.zipRight(consumer)(tsplus_module_2.writeNow(outElem))
|
46
|
-
})(out), fileName_1 + ":121:42")(tsplus_module_5.flatten(tsplus_module_4.take(queue, fileName_1 + ":121:18"), fileName_1 + ":121:23")));
|
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")));
|
47
44
|
return consumer;
|
48
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 => {
|
49
|
-
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(
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
case "BufferSliding":
|
63
|
-
return tsplus_module_5.flatMap(canceler => tsplus_module_5.flatMap(latch => tsplus_module_5.flatMap(size => tsplus_module_5.flatMap(() => {
|
64
|
-
const raceIOs = tsplus_module_16.scoped(tsplus_module_5.flatMap(io => tsplus_module_14.race(tsplus_module_11.wait(canceler, fileName_1 + ":104:85"))(tsplus_module_14.race(tsplus_module_11.wait(errorSignal, fileName_1 + ":104:64"))(evaluatePull(io))), fileName_1 + ":103:67")(tsplus_module_15.toPull(channel)), fileName_1 + ":105:30");
|
65
|
-
return tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(() => tsplus_module_5.map(b => !b, fileName_1 + ":108:60")(tsplus_module_11.isDone(errorSignal, fileName_1 + ":108:49")), fileName_1 + ":107:30")(tsplus_module_11.wait(latch, fileName_1 + ":107:36")), fileName_1 + ":106:30")(tsplus_module_13.fork(permits.withPermit(tsplus_module_5.zipRight(raceIOs, fileName_1 + ":106:83")(tsplus_module_11.succeed_(undefined, fileName_1 + ":106:63")(latch))), fileName_1 + ":106:93"));
|
66
|
-
}, 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"));
|
67
|
-
}
|
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
|
+
switch (mergeStrategy) {
|
49
|
+
case "BackPressure":
|
50
|
+
return tsplus_module_5.flatMap(latch => {
|
51
|
+
const raceIOs = tsplus_module_16.scoped(tsplus_module_5.flatMap(io => tsplus_module_14.race(tsplus_module_11.wait(errorSignal, fileName_1 + ":91:64"))(evaluatePull(io)), fileName_1 + ":90:67")(tsplus_module_15.toPull(channel)), fileName_1 + ":92:30");
|
52
|
+
return tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(() => tsplus_module_5.map(b => !b, fileName_1 + ":95:60")(tsplus_module_11.isDone(errorSignal, fileName_1 + ":95:49")), fileName_1 + ":94:30")(tsplus_module_11.wait(latch, fileName_1 + ":94:36")), fileName_1 + ":93:30")(tsplus_module_13.fork(permits.withPermit(tsplus_module_5.zipRight(raceIOs, fileName_1 + ":93:83")(tsplus_module_11.succeed_(undefined, fileName_1 + ":93:63")(latch))), fileName_1 + ":93:93"));
|
53
|
+
}, fileName_1 + ":89:46")(tsplus_module_17.make(fileName_1 + ":89:58"));
|
54
|
+
case "BufferSliding":
|
55
|
+
return tsplus_module_5.flatMap(canceler => tsplus_module_5.flatMap(latch => tsplus_module_5.flatMap(size => tsplus_module_5.flatMap(() => {
|
56
|
+
const raceIOs = tsplus_module_16.scoped(tsplus_module_5.flatMap(io => tsplus_module_14.race(tsplus_module_11.wait(canceler, fileName_1 + ":104:85"))(tsplus_module_14.race(tsplus_module_11.wait(errorSignal, fileName_1 + ":104:64"))(evaluatePull(io))), fileName_1 + ":103:67")(tsplus_module_15.toPull(channel)), fileName_1 + ":105:30");
|
57
|
+
return tsplus_module_5.flatMap(() => tsplus_module_5.flatMap(() => tsplus_module_5.map(b => !b, fileName_1 + ":108:60")(tsplus_module_11.isDone(errorSignal, fileName_1 + ":108:49")), fileName_1 + ":107:30")(tsplus_module_11.wait(latch, fileName_1 + ":107:36")), fileName_1 + ":106:30")(tsplus_module_13.fork(permits.withPermit(tsplus_module_5.zipRight(raceIOs, fileName_1 + ":106:83")(tsplus_module_11.succeed_(undefined, fileName_1 + ":106:63")(latch))), fileName_1 + ":106:93"));
|
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"));
|
68
59
|
}
|
69
60
|
})(doneOrChannel), fileName_1 + ":63:28")(pull)), fileName_1 + ":114:37"));
|
70
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")));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mergeAllWith.cjs","names":["_function","require","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","mergeAllWith","f","bufferSize","mergeStrategy","channels","tsplus_module_2","unwrapScoped","tsplus_module_5","map","queue","consumer","unwrap","matchCause","tsplus_module_1","failCauseNow","out","tsplus_module_3","match","
|
1
|
+
{"version":3,"file":"mergeAllWith.cjs","names":["_function","require","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","mergeAllWith","f","bufferSize","mergeStrategy","channels","tsplus_module_2","unwrapScoped","tsplus_module_5","map","queue","consumer","unwrap","matchCause","tsplus_module_1","failCauseNow","out","tsplus_module_3","match","endNow","outElem","zipRight","writeNow","fileName_1","flatten","tsplus_module_4","take","tsplus_module_26","withChildren","getChildren","flatMap","cancelers","lastDone","errorSignal","permits","pull","evaluatePull","md1","tsplus_module_9","unit","outDone","tsplus_module_19","update","md2","tsplus_module_18","just","repeatUntil","m","tsplus_module_20","isJust","ea","succeedNow","as","nothing","offer","tsplus_module_8","right","tsplus_module_13","fork","repeatWhile","identity","matchCauseIO","cause","tsplus_module_6","interruptAll","doneOrChannel","tsplus_module_12","raceWith","withPermits","_","permitAcquisition","tsplus_module_7","interrupt","failureAwait","maybeDone","left","tsplus_module_10","tsplus_module_11","wait","channel","latch","raceIOs","tsplus_module_16","scoped","io","tsplus_module_14","race","tsplus_module_15","toPull","b","isDone","withPermit","succeed_","undefined","tsplus_module_17","make","canceler","size","when","tsplus_module_21","makeSemaphore","tsplus_module_22","tsplus_module_24","acquireRelease","tsplus_module_23","makeUnbounded","shutdown","makeBounded","tsplus_module_25","addFinalizer"],"sources":["../../../_src/Channel/api/mergeAllWith.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;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