@fncts/base 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- package/_cjs/collection/Iterable/api.cjs +3 -2
- package/_cjs/collection/Iterable/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/api.cjs +25 -12
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/api.cjs +9 -8
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +3 -2
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/internal.cjs +7 -6
- package/_cjs/collection/immutable/HashMap/internal.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet/api.cjs +7 -6
- package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +18 -17
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs +2 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs.map +1 -1
- package/_cjs/collection/immutable/List/api.cjs +3 -2
- package/_cjs/collection/immutable/List/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Queue/api.cjs +7 -6
- package/_cjs/collection/immutable/Queue/api.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/api.cjs +23 -22
- package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap/iterator.cjs +7 -6
- package/_cjs/collection/immutable/SortedMap/iterator.cjs.map +1 -1
- package/_cjs/collection/mutable/HashMap.cjs +6 -19
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
- package/_cjs/control/CompletablePromise.cjs +21 -0
- package/_cjs/control/CompletablePromise.cjs.map +1 -0
- package/_cjs/control/Z/api.cjs +1 -1
- package/_cjs/control/Z/api.cjs.map +1 -1
- package/_cjs/control/Z/runtime.cjs +2 -2
- package/_cjs/control/Z/runtime.cjs.map +1 -1
- package/_cjs/data/Cause/api/fold.cjs +8 -7
- package/_cjs/data/Cause/api/fold.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +80 -79
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/DatumEither/api.cjs +5 -4
- package/_cjs/data/DatumEither/api.cjs.map +1 -1
- package/_cjs/data/Decoder/api.cjs +2 -1
- package/_cjs/data/Decoder/api.cjs.map +1 -1
- package/_cjs/data/Either/api/alignWith.cjs +2 -1
- package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +17 -16
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/constructors.cjs +10 -9
- package/_cjs/data/Either/constructors.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +16 -12
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +7 -6
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/EitherT/api.cjs +4 -3
- package/_cjs/data/EitherT/api.cjs.map +1 -1
- package/_cjs/data/Eq/api.cjs +20 -0
- package/_cjs/data/Eq/api.cjs.map +1 -0
- package/_cjs/data/Eq.cjs +11 -0
- package/_cjs/data/Eq.cjs.map +1 -1
- package/_cjs/data/Equatable/api.cjs +27 -8
- package/_cjs/data/Equatable/api.cjs.map +1 -1
- package/_cjs/data/Equatable/definition.cjs +1 -1
- package/_cjs/data/Equatable/definition.cjs.map +1 -1
- package/_cjs/data/Exit/api.cjs +32 -6
- package/_cjs/data/Exit/api.cjs.map +1 -1
- package/_cjs/data/Exit/constructors.cjs +13 -12
- package/_cjs/data/Exit/constructors.cjs.map +1 -1
- package/_cjs/data/Exit/definition.cjs +11 -6
- package/_cjs/data/Exit/definition.cjs.map +1 -1
- package/_cjs/data/Interval.cjs +2 -1
- package/_cjs/data/Interval.cjs.map +1 -1
- package/_cjs/data/Maybe/api.cjs +8 -7
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/constructors.cjs +11 -11
- package/_cjs/data/Maybe/constructors.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs +10 -5
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +2 -1
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/These/destructors.cjs +3 -2
- package/_cjs/data/These/destructors.cjs.map +1 -1
- package/_cjs/data/exceptions/IOError.cjs +25 -0
- package/_cjs/data/exceptions/IOError.cjs.map +1 -0
- package/_cjs/data/exceptions/NoSuchElementError.cjs.map +1 -1
- package/_cjs/data/exceptions.cjs +11 -0
- package/_cjs/data/exceptions.cjs.map +1 -1
- package/_cjs/optics/Lens/definition.cjs +2 -1
- package/_cjs/optics/Lens/definition.cjs.map +1 -1
- package/_cjs/optics/Prism/api/just.cjs +2 -1
- package/_cjs/optics/Prism/api/just.cjs.map +1 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs +2 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
- package/_cjs/typeclass/Semialign.cjs +2 -1
- package/_cjs/typeclass/Semialign.cjs.map +1 -1
- package/_cjs/typeclass/Witherable.cjs +2 -1
- package/_cjs/typeclass/Witherable.cjs.map +1 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs +2 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
- package/_cjs/types.cjs +0 -11
- package/_cjs/types.cjs.map +1 -1
- package/_mjs/collection/Iterable/api.mjs +3 -2
- package/_mjs/collection/Iterable/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api.mjs +24 -12
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/api.mjs +9 -8
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +3 -2
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/internal.mjs +7 -6
- package/_mjs/collection/immutable/HashMap/internal.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +7 -6
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +18 -17
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs +2 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api.mjs +3 -2
- package/_mjs/collection/immutable/List/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Queue/api.mjs +7 -6
- package/_mjs/collection/immutable/Queue/api.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/api.mjs +23 -22
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/iterator.mjs +7 -6
- package/_mjs/collection/immutable/SortedMap/iterator.mjs.map +1 -1
- package/_mjs/collection/mutable/HashMap.mjs +6 -5
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
- package/_mjs/control/CompletablePromise.mjs +15 -0
- package/_mjs/control/CompletablePromise.mjs.map +1 -0
- package/_mjs/control/Z/api.mjs +1 -1
- package/_mjs/control/Z/api.mjs.map +1 -1
- package/_mjs/control/Z/runtime.mjs +2 -2
- package/_mjs/control/Z/runtime.mjs.map +1 -1
- package/_mjs/data/Cause/api/fold.mjs +8 -7
- package/_mjs/data/Cause/api/fold.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +80 -79
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/DatumEither/api.mjs +5 -4
- package/_mjs/data/DatumEither/api.mjs.map +1 -1
- package/_mjs/data/Decoder/api.mjs +2 -1
- package/_mjs/data/Decoder/api.mjs.map +1 -1
- package/_mjs/data/Either/api/alignWith.mjs +2 -1
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +17 -16
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/constructors.mjs +10 -9
- package/_mjs/data/Either/constructors.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +15 -11
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +7 -6
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/EitherT/api.mjs +4 -3
- package/_mjs/data/EitherT/api.mjs.map +1 -1
- package/_mjs/data/Eq/api.mjs +12 -0
- package/_mjs/data/Eq/api.mjs.map +1 -0
- package/_mjs/data/Eq.mjs +1 -0
- package/_mjs/data/Eq.mjs.map +1 -1
- package/_mjs/data/Equatable/api.mjs +26 -7
- package/_mjs/data/Equatable/api.mjs.map +1 -1
- package/_mjs/data/Equatable/definition.mjs +1 -1
- package/_mjs/data/Equatable/definition.mjs.map +1 -1
- package/_mjs/data/Exit/api.mjs +30 -6
- package/_mjs/data/Exit/api.mjs.map +1 -1
- package/_mjs/data/Exit/constructors.mjs +13 -12
- package/_mjs/data/Exit/constructors.mjs.map +1 -1
- package/_mjs/data/Exit/definition.mjs +11 -6
- package/_mjs/data/Exit/definition.mjs.map +1 -1
- package/_mjs/data/Interval.mjs +2 -1
- package/_mjs/data/Interval.mjs.map +1 -1
- package/_mjs/data/Maybe/api.mjs +8 -7
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/constructors.mjs +11 -11
- package/_mjs/data/Maybe/constructors.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs +10 -5
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +2 -1
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/These/destructors.mjs +3 -2
- package/_mjs/data/These/destructors.mjs.map +1 -1
- package/_mjs/data/exceptions/IOError.mjs +14 -0
- package/_mjs/data/exceptions/IOError.mjs.map +1 -0
- package/_mjs/data/exceptions/NoSuchElementError.mjs.map +1 -1
- package/_mjs/data/exceptions.mjs +1 -0
- package/_mjs/data/exceptions.mjs.map +1 -1
- package/_mjs/optics/Lens/definition.mjs +2 -1
- package/_mjs/optics/Lens/definition.mjs.map +1 -1
- package/_mjs/optics/Prism/api/just.mjs +2 -1
- package/_mjs/optics/Prism/api/just.mjs.map +1 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs +2 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
- package/_mjs/typeclass/Semialign.mjs +2 -1
- package/_mjs/typeclass/Semialign.mjs.map +1 -1
- package/_mjs/typeclass/Witherable.mjs +2 -1
- package/_mjs/typeclass/Witherable.mjs.map +1 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs +2 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
- package/_mjs/types.mjs +0 -1
- package/_mjs/types.mjs.map +1 -1
- package/_src/collection/immutable/Conc/api.ts +12 -0
- package/_src/control/CompletablePromise.ts +23 -0
- package/_src/control.ts +1 -0
- package/_src/data/Either/constructors.ts +4 -4
- package/_src/data/Either/definition.ts +13 -6
- package/_src/data/Eq/api.ts +8 -0
- package/_src/data/Eq.ts +1 -0
- package/_src/data/Equatable/api.ts +27 -10
- package/_src/data/Equatable/definition.ts +6 -2
- package/_src/data/Exit/api.ts +26 -0
- package/_src/data/Exit/constructors.ts +7 -7
- package/_src/data/Exit/definition.ts +9 -4
- package/_src/data/Maybe/constructors.ts +4 -6
- package/_src/data/Maybe/definition.ts +9 -1
- package/_src/data/exceptions/IOError.ts +11 -0
- package/_src/data/exceptions/NoSuchElementError.ts +1 -1
- package/_src/data/exceptions.ts +1 -0
- package/_src/types.ts +0 -1
- package/collection/immutable/Conc/api.d.ts +5 -0
- package/control/CompletablePromise.d.ts +13 -0
- package/control.d.ts +1 -0
- package/data/Either/constructors.d.ts +2 -2
- package/data/Either/definition.d.ts +12 -5
- package/data/Eq/api.d.ts +6 -0
- package/data/Eq.d.ts +1 -0
- package/data/Equatable/api.d.ts +1 -1
- package/data/Equatable/definition.d.ts +4 -1
- package/data/Exit/api.d.ts +12 -0
- package/data/Exit/constructors.d.ts +5 -5
- package/data/Exit/definition.d.ts +9 -2
- package/data/Maybe/constructors.d.ts +2 -2
- package/data/Maybe/definition.d.ts +9 -1
- package/data/exceptions/IOError.d.ts +9 -0
- package/data/exceptions/NoSuchElementError.d.ts +1 -1
- package/data/exceptions.d.ts +1 -0
- package/package.json +1 -1
- package/types.d.ts +0 -1
- package/_cjs/types/test.cjs +0 -6
- package/_cjs/types/test.cjs.map +0 -1
- package/_mjs/types/test.mjs +0 -2
- package/_mjs/types/test.mjs.map +0 -1
- package/_src/types/test.ts +0 -0
- package/types/test.d.ts +0 -1
package/_mjs/data/Maybe/api.mjs
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/data/Maybe/api.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/Maybe/constructors";
|
2
3
|
import * as tsplus_module_2 from "@fncts/base/data/Either/destructors";
|
3
4
|
import * as tsplus_module_3 from "@fncts/base/data/Maybe/destructors";
|
@@ -12,7 +13,7 @@ export function ap(fa) {
|
|
12
13
|
return self => {
|
13
14
|
void 0;
|
14
15
|
void 0;
|
15
|
-
return self._tag === "Just" /* MaybeTag.Just */ && fa._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_1.just(self.value(fa.value)) : tsplus_module_1.nothing();
|
16
|
+
return self._tag === "Just" /* MaybeTag.Just */ && fa._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_1.just(self.value(fa.value), fileName_1 + ":14:75") : tsplus_module_1.nothing(fileName_1 + ":14:107");
|
16
17
|
};
|
17
18
|
}
|
18
19
|
/**
|
@@ -48,7 +49,7 @@ export function some(p) {
|
|
48
49
|
export function filter(p) {
|
49
50
|
return self => {
|
50
51
|
void 0;
|
51
|
-
return self._tag === "Just" /* MaybeTag.Just */ && p(self.value) ? self : tsplus_module_1.nothing();
|
52
|
+
return self._tag === "Just" /* MaybeTag.Just */ && p(self.value) ? self : tsplus_module_1.nothing(fileName_1 + ":59:73");
|
52
53
|
};
|
53
54
|
}
|
54
55
|
/**
|
@@ -68,7 +69,7 @@ export function flatten(self) {
|
|
68
69
|
export function partition(p) {
|
69
70
|
return self => {
|
70
71
|
void 0;
|
71
|
-
return self._tag === "Just" /* MaybeTag.Just */ && p(self.value) ? [tsplus_module_1.nothing(), self] : [self, tsplus_module_1.nothing()];
|
72
|
+
return self._tag === "Just" /* MaybeTag.Just */ && p(self.value) ? [tsplus_module_1.nothing(fileName_1 + ":87:67"), self] : [self, tsplus_module_1.nothing(fileName_1 + ":87:93")];
|
72
73
|
};
|
73
74
|
}
|
74
75
|
/**
|
@@ -78,9 +79,9 @@ export function partitionMap(f) {
|
|
78
79
|
return self => {
|
79
80
|
void 0;
|
80
81
|
if (self._tag === "Just" /* MaybeTag.Just */) {
|
81
|
-
return tsplus_module_2.match(b => [tsplus_module_1.just(b), tsplus_module_1.nothing()], c => [tsplus_module_1.nothing(), tsplus_module_1.just(c)])(f(self.value));
|
82
|
+
return tsplus_module_2.match(b => [tsplus_module_1.just(b, fileName_1 + ":99:21"), tsplus_module_1.nothing(fileName_1 + ":99:33")], c => [tsplus_module_1.nothing(fileName_1 + ":100:24"), tsplus_module_1.just(c, fileName_1 + ":100:32")])(f(self.value));
|
82
83
|
} else {
|
83
|
-
return [tsplus_module_1.nothing(), tsplus_module_1.nothing()];
|
84
|
+
return [tsplus_module_1.nothing(fileName_1 + ":103:22"), tsplus_module_1.nothing(fileName_1 + ":103:33")];
|
84
85
|
}
|
85
86
|
};
|
86
87
|
}
|
@@ -130,7 +131,7 @@ export function getOrElse(orElse) {
|
|
130
131
|
export function map(f) {
|
131
132
|
return self => {
|
132
133
|
void 0;
|
133
|
-
return self._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_1.just(f(self.value)) : self;
|
134
|
+
return self._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_1.just(f(self.value), fileName_1 + ":158:46") : self;
|
134
135
|
};
|
135
136
|
}
|
136
137
|
/**
|
@@ -167,7 +168,7 @@ function zipWith_1(fb, f) {
|
|
167
168
|
return self => {
|
168
169
|
void 0;
|
169
170
|
void 0;
|
170
|
-
return self._tag === "Just" /* MaybeTag.Just */ && fb._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_1.just(f(self.value, fb.value)) : tsplus_module_1.nothing();
|
171
|
+
return self._tag === "Just" /* MaybeTag.Just */ && fb._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_1.just(f(self.value, fb.value), fileName_1 + ":199:75") : tsplus_module_1.nothing(fileName_1 + ":199:110");
|
171
172
|
};
|
172
173
|
}
|
173
174
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"api.mjs","mappings":"
|
1
|
+
{"version":3,"file":"api.mjs","mappings":";;;;;aAuBgBA,OAAO;aA2KPC,OAAO;AA/LvB,SAASC,QAAQ,QAAQ,iBAAgB;AAGzC;;;AAGA,OAAM,SAAUC,EAAE,CAAIC,EAAY;EAChC,OAAWC,IAAwB,IAAc;IAC/C;IACA;IACA,OAAOA,IAAI,CAACC,IAAI,mCAAsBF,EAAE,CAACE,IAAI,kCAAqBC,qBAAKF,IAAI,CAACG,KAAK,CAACJ,EAAE,CAACI,KAAK,CAAC,wBAAC,GAAGD,+CAAS;EAC1G,CAAC;AACH;AAEA;;;;;;AAMA,mBAA8BE,CAAqB;EACjD,OAAQJ,IAAc,IAAc;IAClC;IACA,OAAOA,IAAI,CAACC,IAAI,kCAAqBG,CAAC,CAACJ,IAAI,CAACG,KAAK,CAAC,GAAIH,IAAgB;EACxE,CAAC;AACH;AAEA;;;AAGA,OAAM,SAAUK,IAAI,CAAIA,IAAO,EAAE,mBAAoBC,CAAQ;EAC3D,OAAQN,IAAc,IAAa;IACjC;IACA,OAAOA,IAAI,CAACC,IAAI,kCAAqBK,CAAC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,OAAQJ,IAAc,IAA2B;IAC/C,OAAOY,UAAaV,8BAAoBE,CAAC,CAAC,EAAnCJ,IAAI,CAAgC;EAC7C,CAAC;AACH;AAEA;;;AAGA,OAAM,SAAUyB,MAAM,CAAIG,EAAkB;EAC1C,OAAW5B,IAAc,IAAkB;IACzC;IACA,OAAOA,IAAI,CAACC,IAAI,wCAAwB2B,EAAE,EAAE,GAAG5B,IAAI;EACrD,CAAC;AACH;AAEA;;;;;AAKA,OAAM,SAAU6B,WAAW,CAAI7B,IAAc;EAC3C,OAAO8B,sBAAW,MAAMC,SAAS,EAAElC,QAAQ,EAApCG,IAAI,CAAiC;AAC9C;AAEA;;;AAGA,mBAAiC4B,EAAY,EAAExB,CAAoB;EACjE,OAAQJ,IAAc,IAAc;IAClC;IACA;IACA,OAAOA,IAAI,CAACC,IAAI,mCAAsB2B,EAAE,CAAC3B,IAAI,kCAAqBC,qBAAKE,CAAC,CAACJ,IAAI,CAACG,KAAK,EAAEyB,EAAE,CAACzB,KAAK,CAAC,yBAAC,GAAGD,gDAAS;EAC7G,CAAC;AACH;AAEA;;;AAGA,OAAM,SAAU8B,GAAG,CAAIC,IAAc;EACnC,OAAWjC,IAAc,IAA8B;IACrD,OAAOkC,UAAaD,IAAI,EAAE,CAACE,CAAC,EAAElB,CAAC,KAAKmB,qBAAOD,CAAC,EAAElB,CAAC,CAAC,EAAzCjB,IAAI,CAAsC;EACnD,CAAC;AACH","names":["flatMap","zipWith","identity","ap","fa","self","_tag","tsplus_module_1","value","f","elem","E","equals","some","p","filter","filterMap","flatMap_1","flatten","partition","partitionMap","tsplus_module_2","b","c","foldLeft","foldRight","foldMap","M","nat","getOrElse","orElse","map","mapNullable","fb","toUndefined","tsplus_module_3","undefined","zip","that","zipWith_1","a","tsplus_module_4"],"sourceRoot":"","sources":["../../../_src/data/Maybe/api.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/data/Maybe/constructors.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/Maybe/definition";
|
2
3
|
export const just = just_1;
|
3
4
|
export const nothing = nothing_1;
|
@@ -7,22 +8,21 @@ export const tryCatch = tryCatch_1;
|
|
7
8
|
* @tsplus static fncts.MaybeOps just
|
8
9
|
* @tsplus static fncts.JustOps __call
|
9
10
|
*/
|
10
|
-
function just_1(a) {
|
11
|
-
return new tsplus_module_1.Just(a);
|
11
|
+
function just_1(a, __tsplusTrace) {
|
12
|
+
return new tsplus_module_1.Just(a, __tsplusTrace);
|
12
13
|
}
|
13
|
-
const _Nothing = /*#__PURE__*/new tsplus_module_1.Nothing();
|
14
14
|
/**
|
15
15
|
* @tsplus static fncts.MaybeOps nothing
|
16
16
|
* @tsplus static fncts.NothingOps __call
|
17
17
|
*/
|
18
|
-
function nothing_1() {
|
19
|
-
return
|
18
|
+
function nothing_1(__tsplusTrace) {
|
19
|
+
return new tsplus_module_1.Nothing(__tsplusTrace);
|
20
20
|
}
|
21
21
|
/**
|
22
22
|
* @tsplus static fncts.MaybeOps fromNullable
|
23
23
|
*/
|
24
24
|
function fromNullable_1(a) {
|
25
|
-
return a == null ? nothing_1() : just_1(a);
|
25
|
+
return a == null ? nothing_1(fileName_1 + ":23:29") : just_1(a, fileName_1 + ":23:38");
|
26
26
|
}
|
27
27
|
/**
|
28
28
|
* @tsplus static fncts.MaybeOps fromNullableK
|
@@ -31,16 +31,16 @@ export function fromNullableK(f) {
|
|
31
31
|
return (...params) => fromNullable_1(f(...params));
|
32
32
|
}
|
33
33
|
export function fromPredicate(a, p) {
|
34
|
-
return p(a) ? just_1(a) : nothing_1();
|
34
|
+
return p(a) ? just_1(a, fileName_1 + ":39:21") : nothing_1(fileName_1 + ":39:34");
|
35
35
|
}
|
36
36
|
/**
|
37
37
|
* @tsplus static fncts.MaybeOps tryCatch
|
38
38
|
*/
|
39
39
|
function tryCatch_1(thunk) {
|
40
40
|
try {
|
41
|
-
return just_1(thunk());
|
41
|
+
return just_1(thunk(), fileName_1 + ":47:16");
|
42
42
|
} catch {
|
43
|
-
return nothing_1();
|
43
|
+
return nothing_1(fileName_1 + ":49:19");
|
44
44
|
}
|
45
45
|
}
|
46
46
|
/**
|
@@ -63,10 +63,10 @@ function raisePartial() {
|
|
63
63
|
export function partial(f) {
|
64
64
|
return (...params) => {
|
65
65
|
try {
|
66
|
-
return just_1(f(raisePartial)(...params));
|
66
|
+
return just_1(f(raisePartial)(...params), fileName_1 + ":74:18");
|
67
67
|
} catch (e) {
|
68
68
|
if (e instanceof PartialException) {
|
69
|
-
return nothing_1();
|
69
|
+
return nothing_1(fileName_1 + ":77:23");
|
70
70
|
}
|
71
71
|
throw e;
|
72
72
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constructors.mjs","mappings":"
|
1
|
+
{"version":3,"file":"constructors.mjs","mappings":";;aAMgBA,IAAI;aAQJC,OAAO;aAOPC,YAAY;aAuBZC,QAAQ;AA1CxB;;;;AAIA,gBAAwBC,CAAI,EAAEC,aAAsB;EAClD,OAAO,oBAAIC,IAAI,CAACF,CAAC,EAAEC,aAAa,CAAC;AACnC;AAEA;;;;AAIA,mBAAmCA,aAAsB;EACvD,OAAO,oBAAIE,OAAO,CAACF,aAAa,CAAC;AACnC;AAEA;;;AAGA,wBAAgCD,CAAc;EAC5C,OAAOA,CAAC,IAAI,IAAI,GAAGI,gCAAS,GAAGC,OAAKL,CAAmB,wBAAC;AAC1D;AAEA;;;AAGA,OAAM,SAAUM,aAAa,CAAsCC,CAAgC;EACjG,OAAO,CAAC,GAAGC,MAAS,KAA4BC,eAAmBF,CAAC,CAAC,GAAGC,MAAM,CAAC,CAAC;AAClF;AAOA,OAAM,SAAUE,aAAa,CAAIV,CAAI,EAAEW,CAAe;EACpD,OAAOA,CAAC,CAACX,CAAC,CAAC,GAAGK,OAAKL,CAAC,wBAAC,GAAGI,gCAAS;AACnC;AAEA;;;AAGA,oBAA4BQ,KAAc;EACxC,IAAI;IACF,OAAOP,OAAKO,KAAK,EAAE,wBAAC;GACrB,CAAC,MAAM;IACN,OAAOR,gCAAS;;AAEpB;AAEA;;;AAGA,OAAM,SAAUS,SAAS,CAAsCN,CAAsB;EACnF,OAAO,CAAC,GAAGC,MAAS,KAAeM,WAAS,MAAMP,CAAC,CAAC,GAAGC,MAAM,CAAC,CAAC;AACjE;AAEA,MAAMO,gBAAgB;EAAtBC;IACW,SAAI,GAAG,kBAAkB;EACpC;;AAEA,SAASC,YAAY;EACnB,MAAM,IAAIF,gBAAgB,EAAE;AAC9B;AAEA;;;AAGA,OAAM,SAAUG,OAAO,CAAsCX,CAA6C;EACxG,OAAO,CAAC,GAAGC,MAAS,KAAc;IAChC,IAAI;MACF,OAAOH,OAAKE,CAAC,CAACU,YAAY,CAAC,CAAC,GAAGT,MAAM,CAAC,wBAAC;KACxC,CAAC,OAAOW,CAAC,EAAE;MACV,IAAIA,CAAC,YAAYJ,gBAAgB,EAAE;QACjC,OAAOX,gCAAS;;MAElB,MAAMe,CAAC;;EAEX,CAAC;AACH","names":["just","nothing","fromNullable","tryCatch","a","__tsplusTrace","Just","Nothing","nothing_1","just_1","fromNullableK","f","params","fromNullable_1","fromPredicate","p","thunk","tryCatchK","tryCatch_1","PartialException","constructor","raisePartial","partial","e"],"sourceRoot":"","sources":["../../../_src/data/Maybe/constructors.ts"],"sourcesContent":[null]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _a;
|
1
|
+
var _a, _b;
|
2
2
|
import * as tsplus_module_1 from "@fncts/base/data/Hashable/hash";
|
3
3
|
import * as tsplus_module_2 from "@fncts/base/data/Equatable/definition";
|
4
4
|
import * as tsplus_module_3 from "@fncts/base/data/Equatable/api";
|
@@ -9,6 +9,7 @@ export const isNothing = isNothing_1;
|
|
9
9
|
import { isObject } from "../../util/predicates.mjs";
|
10
10
|
export const MaybeVariance = /*#__PURE__*/Symbol.for("fncts.Maybe.Variance");
|
11
11
|
export const MaybeTypeId = /*#__PURE__*/Symbol.for("fncts.Maybe");
|
12
|
+
const IOTypeId = /*#__PURE__*/Symbol.for("fncts.io.IO");
|
12
13
|
const _justHash = /*#__PURE__*/tsplus_module_1.hashString("fncts.Just");
|
13
14
|
const _nothingHash = /*#__PURE__*/tsplus_module_1.hashString("fncts.Nothing");
|
14
15
|
/**
|
@@ -18,17 +19,20 @@ const _nothingHash = /*#__PURE__*/tsplus_module_1.hashString("fncts.Nothing");
|
|
18
19
|
export class Maybe {
|
19
20
|
constructor() {
|
20
21
|
this[_a] = MaybeTypeId;
|
22
|
+
this[_b] = IOTypeId;
|
23
|
+
this.trace = undefined;
|
21
24
|
}
|
22
25
|
}
|
23
|
-
_a = MaybeTypeId;
|
26
|
+
_a = MaybeTypeId, _b = IOTypeId;
|
24
27
|
/**
|
25
28
|
* @tsplus type fncts.Just
|
26
29
|
* @tsplus companion fncts.JustOps
|
27
30
|
*/
|
28
31
|
export class Just extends Maybe {
|
29
|
-
constructor(value) {
|
32
|
+
constructor(value, trace) {
|
30
33
|
super();
|
31
34
|
this.value = value;
|
35
|
+
this.trace = trace;
|
32
36
|
this._tag = "Just" /* MaybeTag.Just */;
|
33
37
|
}
|
34
38
|
|
@@ -44,8 +48,9 @@ export class Just extends Maybe {
|
|
44
48
|
* @tsplus companion fncts.NothingOps
|
45
49
|
*/
|
46
50
|
export class Nothing extends Maybe {
|
47
|
-
constructor() {
|
48
|
-
super(
|
51
|
+
constructor(trace) {
|
52
|
+
super();
|
53
|
+
this.trace = trace;
|
49
54
|
this._tag = "Nothing" /* MaybeTag.Nothing */;
|
50
55
|
}
|
51
56
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"definition.mjs","mappings":";;;;;
|
1
|
+
{"version":3,"file":"definition.mjs","mappings":";;;;;aAqFgBA,OAAO;aASPC,MAAM;aAUNC,SAAS;AAxGzB,SAASC,QAAQ,QAAQ,2BAA0B;AAOnD,OAAO,MAAMC,aAAa,gBAAGC,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AAG/D,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;AACxC;AAEA;;;;;AAKA,kBAA0BD,IAAc;EACtC;EACA,OAAOA,IAAI,CAACE,IAAI;AAClB;AAEA;;;;;AAKA,qBAA6BF,IAAc;EACzC;EACA,OAAOA,IAAI,CAACE,IAAI;AAClB;AAEA;;;;;AAKA,OAAM,SAAUC,QAAQ,CAAIH,IAAc;EACxC;AAAA","names":["isMaybe","isJust","isNothing","isObject","MaybeVariance","Symbol","for","MaybeTypeId","IOTypeId","_justHash","tsplus_module_1","_nothingHash","Maybe","constructor","undefined","Just","value","trace","that","isMaybe_1","isJust_1","tsplus_module_3","tsplus_module_4","Nothing","isNothing_1","unifyMaybe","self","u","_tag","concrete"],"sourceRoot":"","sources":["../../../_src/data/Maybe/definition.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/data/Maybe/instances.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/typelevel/HKT";
|
2
3
|
import * as tsplus_module_2 from "@fncts/base/data/Maybe/definition";
|
3
4
|
import * as tsplus_module_3 from "@fncts/base/data/Guard/definition";
|
@@ -77,7 +78,7 @@ export function deriveGuard(...[guard]) {
|
|
77
78
|
*/
|
78
79
|
export function deriveDecoder(...[value]) {
|
79
80
|
const label = `Maybe<${value.label}>`;
|
80
|
-
return tsplus_module_7.makeDecoder(input => tsplus_module_6.map(decoded => decoded._tag === "Nothing" ? tsplus_module_4.nothing() : tsplus_module_4.just(decoded.value))(tsplus_module_5.getDecoder(value).decode(input)), label);
|
81
|
+
return tsplus_module_7.makeDecoder(input => tsplus_module_6.map(decoded => decoded._tag === "Nothing" ? tsplus_module_4.nothing(fileName_1 + ":84:65") : tsplus_module_4.just(decoded.value, fileName_1 + ":84:81"))(tsplus_module_5.getDecoder(value).decode(input)), label);
|
81
82
|
}
|
82
83
|
/**
|
83
84
|
* @tsplus derive fncts.Encoder[fncts.Maybe]<_> 10
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"instances.mj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AAI,KAAK,SAAS,GAAIC,8CAAe,GAAIA,qBAAKF,OAAO,CAACN,KAAK,wBAAQ,EAFhGS,2BAAqBT,KAAK,CAAC,CACxBU,MAAM,CAACN,KAAK,CAAC,CACiF,EACnGF,KAAK,CACN;AACH;AAEA;;;AAGA,OAAM,SAAUS,aAAa,CAC3B,GAAG,CAACX,KAAK,CAA6D;EAEtE,OAAOY,4BAASR,KAAK,IAAI;IACvB;IACA,IAAIN,4BAAK,CAAS,EAAE;MAClB,OAAO;QACLS,IAAI,EAAE,MAAM;QACZP,KAAK,EAAEA,KAAK,CAACa,MAAM,CAACT,KAAK,CAACJ,KAAK;OAChC;KACF,MAAM;MACL,OAAO;QACLO,IAAI,EAAE;OACP;;EAEL,CAAC,CAAC;AACJ","names":["filter","filterMap","flatMap","foldLeft","foldRight","map","partition","partitionMap","zip","zipWith","just","Functor_1","Functor","Apply_1","Apply","Applicative_1","pure","Applicative","Monad","Foldable","Filterable","deriveGuard","guard","tsplus_module_3","u","tsplus_module_2","is","value","deriveDecoder","label","tsplus_module_7","input","tsplus_module_6","decoded","_tag","tsplus_module_4","tsplus_module_5","decode","deriveEncoder","tsplus_module_8","encode"],"sourceRoot":"","sources":["../../../_src/data/Maybe/instances.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/data/These/destructors.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/These/api";
|
2
3
|
import * as tsplus_module_2 from "@fncts/base/data/Maybe/constructors";
|
3
4
|
export const leftMaybe = leftMaybe_1;
|
@@ -17,13 +18,13 @@ export function unsafeGetLeft(self) {
|
|
17
18
|
* @tsplus getter fncts.These rightMaybe
|
18
19
|
*/
|
19
20
|
export function rightMaybe(self) {
|
20
|
-
return tsplus_module_1.isRight(self) || tsplus_module_1.isBoth(self) ? tsplus_module_2.just(self.right) : tsplus_module_2.nothing();
|
21
|
+
return tsplus_module_1.isRight(self) || tsplus_module_1.isBoth(self) ? tsplus_module_2.just(self.right, fileName_1 + ":21:48") : tsplus_module_2.nothing(fileName_1 + ":21:70");
|
21
22
|
}
|
22
23
|
/**
|
23
24
|
* @tsplus getter fncts.These leftMaybe
|
24
25
|
*/
|
25
26
|
function leftMaybe_1(self) {
|
26
|
-
return tsplus_module_1.isLeft(self) ? tsplus_module_2.just(self.left) : tsplus_module_2.nothing();
|
27
|
+
return tsplus_module_1.isLeft(self) ? tsplus_module_2.just(self.left, fileName_1 + ":28:30") : tsplus_module_2.nothing(fileName_1 + ":28:51");
|
27
28
|
}
|
28
29
|
/**
|
29
30
|
* @tsplus pipeable fncts.These match
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"destructors.mjs","mappings":"
|
1
|
+
{"version":3,"file":"destructors.mjs","mappings":";;;aA0BgBA,SAAS;AAxBzB;;;AAGA,OAAM,SAAUC,cAAc,CAAOC,IAAiB;EACpD,OAAOC,4BAAI,CAAU,IAAIA,2BAAI,CAAS,GAAGD,IAAI,CAACE,KAAK,GAAGC,SAAS;AACjE;AAEA;;;AAGA,OAAM,SAAUC,aAAa,CAAOJ,IAAiB;EACnD,OAAOC,2BAAI,CAAS,GAAGD,IAAI,CAACK,IAAI,GAAGF,SAAS;AAC9C;AAEA;;;AAGA,OAAM,SAAUG,UAAU,CAAON,IAAiB;EAChD,OAAOC,4BAAI,CAAU,IAAIA,2BAAI,CAAS,GAAGM,qBAAKP,IAAI,CAACE,KAAK,wBAAC,GAAGK,8CAAS;AACvE;AAEA;;;AAGA,qBAAgCP,IAAiB;EAC/C,OAAOC,2BAAI,CAAS,GAAGM,qBAAKP,IAAI,CAACK,IAAI,wBAAC,GAAGE,8CAAS;AACpD;AAEA;;;AAGA,OAAM,SAAUC,KAAK,CAAgBH,IAAiB,EAAEH,KAAkB,EAAEO,IAAuB;EACjG,OAAQT,IAAiB,IAAe;IACtC,QAAQA,IAAI,CAACU,IAAI;MACf;QACE,OAAOL,IAAI,CAACL,IAAI,CAACK,IAAI,CAAC;MACxB;QACE,OAAOH,KAAK,CAACF,IAAI,CAACE,KAAK,CAAC;MAC1B;QACE,OAAOO,IAAI,CAACT,IAAI,CAACK,IAAI,EAAEL,IAAI,CAACE,KAAK,CAAC;IAAC;EAEzC,CAAC;AACH;AAEA;;;AAGA,OAAM,SAAUS,MAAM,CAAaN,IAAiB,EAAEH,KAA+B;EACnF,OAAQF,IAAiB,IAAW;IAClC,QAAQA,IAAI,CAACU,IAAI;MACf;QACE,OAAOL,IAAI,CAACL,IAAI,CAACK,IAAI,CAAC;MACxB;MACA;QACE,OAAOH,KAAK,aAACF,IAAI,GAAYA,IAAI,CAACE,KAAK,CAAC;IAAC;EAE/C,CAAC;AACH","names":["leftMaybe","unsafeGetRight","self","tsplus_module_1","right","undefined","unsafeGetLeft","left","rightMaybe","tsplus_module_2","match","both","_tag","match2"],"sourceRoot":"","sources":["../../../_src/data/These/destructors.ts"],"sourcesContent":[null]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
var _a;
|
2
|
+
import * as tsplus_module_1 from "@fncts/base/util/predicates";
|
3
|
+
export const IOErrorTypeId = /*#__PURE__*/Symbol.for("fncts.base.exceptions.IOError");
|
4
|
+
export class IOError {
|
5
|
+
constructor(cause) {
|
6
|
+
this.cause = cause;
|
7
|
+
this[_a] = IOErrorTypeId;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
_a = IOErrorTypeId;
|
11
|
+
export function isIOError(u) {
|
12
|
+
return tsplus_module_1.isObject(u) && IOErrorTypeId in u;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=IOError.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IOError.mjs","mappings":";;AAAA,OAAO,MAAMA,aAAa,gBAAGC,MAAM,CAACC,GAAG,CAAC,+BAA+B,CAAC;AAGxE,OAAM,MAAOC,OAAO;EAElBC,YAAqBC,KAAe;IAAf,UAAK,GAALA,KAAK;IADjB,QAAe,GAAkBL,aAAa;EAChB;;KAD7BA,aAAa;AAIzB,OAAM,SAAUM,SAAS,CAACC,CAAU;EAClC,OAAOC,wBAAQ,CAACD,CAAC,CAAC,IAAIP,aAAa,IAAIO,CAAC;AAC1C","names":["IOErrorTypeId","Symbol","for","IOError","constructor","cause","isIOError","u","tsplus_module_1"],"sourceRoot":"","sources":["../../../_src/data/exceptions/IOError.ts"],"sourcesContent":[null]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NoSuchElementError.mjs","mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAG,oBAAoB;AAEzD,OAAM,MAAOC,kBAAmB,SAAQC,KAAK;EAE3CC,YAAYC,
|
1
|
+
{"version":3,"file":"NoSuchElementError.mjs","mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAG,oBAAoB;AAEzD,OAAM,MAAOC,kBAAmB,SAAQC,KAAK;EAE3CC,YAAYC,OAAgB;IAC1B,KAAK,CAACA,OAAO,CAAC;IAFP,SAAI,GAAGJ,qBAAqB;IAGnC,IAAI,CAACK,IAAI,GAAGL,qBAAqB;EACnC","names":["NoSuchElementErrorTag","NoSuchElementError","Error","constructor","message","name"],"sourceRoot":"","sources":["../../../_src/data/exceptions/NoSuchElementError.ts"],"sourcesContent":[null]}
|
package/_mjs/data/exceptions.mjs
CHANGED
@@ -5,6 +5,7 @@ export * from "./exceptions/IllegalStateError.mjs";
|
|
5
5
|
export * from "./exceptions/IndexOutOfBoundsError.mjs";
|
6
6
|
export * from "./exceptions/InterruptedException.mjs";
|
7
7
|
export * from "./exceptions/InvalidCapacityError.mjs";
|
8
|
+
export * from "./exceptions/IOError.mjs";
|
8
9
|
export * from "./exceptions/NoSuchElementError.mjs";
|
9
10
|
export * from "./exceptions/RuntimeError.mjs";
|
10
11
|
//# sourceMappingURL=exceptions.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"exceptions.mjs","mappings":"AAAA;AACA,cAAc,6CAA4C;AAC1D,cAAc,uCAAsC;AACpD,cAAc,oCAAmC;AACjD,cAAc,wCAAuC;AACrD,cAAc,uCAAsC;AACpD,cAAc,uCAAsC;AACpD,cAAc,qCAAoC;AAClD,cAAc,+BAA8B","names":[],"sourceRoot":"","sources":["../../_src/data/exceptions.ts"],"sourcesContent":[null]}
|
1
|
+
{"version":3,"file":"exceptions.mjs","mappings":"AAAA;AACA,cAAc,6CAA4C;AAC1D,cAAc,uCAAsC;AACpD,cAAc,oCAAmC;AACjD,cAAc,wCAAuC;AACrD,cAAc,uCAAsC;AACpD,cAAc,uCAAsC;AACpD,cAAc,0BAAyB;AACvC,cAAc,qCAAoC;AAClD,cAAc,+BAA8B","names":[],"sourceRoot":"","sources":["../../_src/data/exceptions.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/optics/Lens/definition.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/Either/constructors";
|
2
3
|
import * as tsplus_module_2 from "@fncts/base/optics/Optional/definition";
|
3
4
|
import * as tsplus_module_3 from "@fncts/base/optics/Getter/definition";
|
@@ -12,7 +13,7 @@ function makePLens_1(F) {
|
|
12
13
|
return {
|
13
14
|
...tsplus_module_2.makePOptional({
|
14
15
|
set: F.set,
|
15
|
-
getOrModify: s => tsplus_module_1.right(F.get(s))
|
16
|
+
getOrModify: s => tsplus_module_1.right(F.get(s), fileName_1 + ":29:64")
|
16
17
|
}),
|
17
18
|
...tsplus_module_3.makeGetter({
|
18
19
|
get: F.get
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"definition.mjs","mappings":"
|
1
|
+
{"version":3,"file":"definition.mjs","mappings":";;;;aA0BgBA,SAAS;AAvBzB,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,SAAS,QAAQ,6BAA6B;AAYvD,OAAO,MAAMC,KAAK,GAAa,EAAE;AAOjC;;;AAGA,qBAAsCC,CAAuB;EAC3D,OAAO;IACL,GAAGC,8BAAU;MAAEC,GAAG,EAAEF,CAAC,CAACE,GAAG;MAAEC,WAAW,EAAGC,CAAC,IAAKC,sBAAaL,CAAC,CAACM,GAAG,CAACF,CAAC,CAAC;IAAC,CAAE,CAAC;IACxE,GAAGG,2BAAO;MAAED,GAAG,EAAEN,CAAC,CAACM;IAAG,CAAE;GACzB;AACH;AAYA,OAAO,MAAME,IAAI,GAAY,EAAE;AAE/B;;;AAGA,OAAM,SAAUC,QAAQ,CAAOT,CAAuB;EACpD,OAAOU,YAAMV,CAAC,CAAC;AACjB","names":["makePLens","Getter","POptional","PLens","F","tsplus_module_2","set","getOrModify","s","tsplus_module_1","get","tsplus_module_3","Lens","makeLens","makePLens_1"],"sourceRoot":"","sources":["../../../_src/optics/Lens/definition.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/optics/Prism/api/just.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/Maybe/constructors";
|
2
3
|
import * as tsplus_module_2 from "@fncts/base/data/Either/constructors";
|
3
4
|
import * as tsplus_module_3 from "@fncts/base/data/Maybe/destructors";
|
@@ -8,7 +9,7 @@ import { Prism } from "@fncts/base/optics/Prism/definition";
|
|
8
9
|
*/
|
9
10
|
export function just() {
|
10
11
|
return tsplus_module_4.makePrism({
|
11
|
-
getOrModify: s => tsplus_module_3.match(() => tsplus_module_2.left(tsplus_module_1.nothing()), tsplus_module_2.right)(s),
|
12
|
+
getOrModify: s => tsplus_module_3.match(() => tsplus_module_2.left(tsplus_module_1.nothing(fileName_1 + ":8:58"), fileName_1 + ":8:50"), tsplus_module_2.right)(s),
|
12
13
|
reverseGet: tsplus_module_1.just
|
13
14
|
});
|
14
15
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"just.mjs","mappings":"
|
1
|
+
{"version":3,"file":"just.mjs","mappings":";;;;;AAAA,SAASA,KAAK,QAAQ,qCAAqC;AAE3D;;;AAGA,OAAM,SAAUC,IAAI;EAClB,OAAOC,0BAAM;IACXC,WAAW,EAAGC,CAAC,IAAKC,sBAAQ,MAAMC,qBAAYC,6CAAS,uBAAC,yBAApCH,CAAC,CAAkD;IACvEI,UAAU;GACX,CAAC;AACJ","names":["Prism","just","tsplus_module_4","getOrModify","s","tsplus_module_3","tsplus_module_2","tsplus_module_1","reverseGet"],"sourceRoot":"","sources":["../../../../_src/optics/Prism/api/just.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/typeclass/ApplicativeExcept.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/Maybe/destructors";
|
2
3
|
import * as tsplus_module_2 from "@fncts/base/data/Either/constructors";
|
3
4
|
import { identity, pipe } from "@fncts/base/data/function";
|
@@ -7,6 +8,6 @@ export function catchJust(F) {
|
|
7
8
|
return f => F.catchAll(e => tsplus_module_1.match(() => F.fail(e), identity)(f(e)));
|
8
9
|
}
|
9
10
|
export function either(F) {
|
10
|
-
return self => F.catchAll(e => F.pure(tsplus_module_2.left(e)))(F.map(tsplus_module_2.right)(self));
|
11
|
+
return self => F.catchAll(e => F.pure(tsplus_module_2.left(e, fileName_1 + ":104:43")))(F.map(tsplus_module_2.right)(self));
|
11
12
|
}
|
12
13
|
//# sourceMappingURL=ApplicativeExcept.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ApplicativeExcept.mjs","mappings":"
|
1
|
+
{"version":3,"file":"ApplicativeExcept.mjs","mappings":";;;AAGA,SAASA,QAAQ,EAAEC,IAAI,QAAQ,2BAA2B;AA4C1D,OAAO,MAAMC,iBAAiB,GAAyB,EAAE;AAEzD,OAAM,SAAUC,SAAS,CACvBC,CAA2B;EAkC3B;EACA,OAAQC,CAAC,IAAKD,CAAC,CAACE,QAAQ,CAAEC,CAAC,IAAKC,sBAAW,MAAMJ,CAAC,CAACK,IAAI,CAACF,CAAC,CAAC,EAAEP,QAAQ,EAApCK,CAAC,CAACE,CAAC,CAAC,CAAiC,CAAC;AACxE;AAUA,OAAM,SAAUG,MAAM,CACpBN,CAAiC;EAEjC,OAAQO,IAAI,IAIRP,CAAC,CAACE,QAAQ,CAAEC,CAAC,IAAKH,CAAC,CAACQ,IAAI,CAACC,qBAAYN,CAAC,yBAAC,CAAC,CAAC,CADzCH,CAAC,CAACU,GAAG,uBAAc,CADnBH,IAAI,EAGL;AACL","names":["identity","pipe","ApplicativeExcept","catchJust","F","f","catchAll","e","tsplus_module_1","fail","either","self","pure","tsplus_module_2","map"],"sourceRoot":"","sources":["../../_src/typeclass/ApplicativeExcept.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/typeclass/Semialign.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/These/destructors";
|
2
3
|
import * as tsplus_module_2 from "@fncts/base/data/Maybe/constructors";
|
3
4
|
export const padZipWith = padZipWith_1;
|
@@ -31,7 +32,7 @@ export function padZip(F) {
|
|
31
32
|
* @tsplus static fncts.SemialignOps padZipWith
|
32
33
|
*/
|
33
34
|
function padZipWith_1(F) {
|
34
|
-
return (fb, f) => F.alignWith(fb, th => tsplus_module_1.match(a => f([tsplus_module_2.just(a), tsplus_module_2.nothing()]), b => f([tsplus_module_2.nothing(), tsplus_module_2.just(b)]), (a, b) => f([tsplus_module_2.just(a), tsplus_module_2.just(b)]))(th));
|
35
|
+
return (fb, f) => F.alignWith(fb, th => tsplus_module_1.match(a => f([tsplus_module_2.just(a, fileName_1 + ":371:23"), tsplus_module_2.nothing(fileName_1 + ":371:35")]), b => f([tsplus_module_2.nothing(fileName_1 + ":372:26"), tsplus_module_2.just(b, fileName_1 + ":372:34")]), (a, b) => f([tsplus_module_2.just(a, fileName_1 + ":373:26"), tsplus_module_2.just(b, fileName_1 + ":373:35")]))(th));
|
35
36
|
}
|
36
37
|
/**
|
37
38
|
* @tsplus static fncts.SemialignOps zipAll
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Semialign.mjs","mappings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,CAAC,CAACW,qBAAKL,CAAC,yBAAC,EAAEK,qBAAKJ,CAAC,yBAAC,CAAC,CAAC,EAHjCH,EAAE,CAID,CACF;AACL;AAmCA;;;AAGA,OAAM,SAAUQ,MAAM,CACpBf,CAAmB;EAgCnB,OAAO,CAACC,EAAE,EAAEQ,CAAC,EAAEC,CAAC,KACdV,CAAC,CAACE,SAAS,CAACD,EAAE,EAAGM,EAAE,IACjBC,sBACGQ,CAAC,IAAK,CAACA,CAAC,EAAEN,CAAC,CAAC,EACZM,CAAC,IAAK,CAACP,CAAC,EAAEO,CAAC,CAAC,EACbnB,KAAK,EAHPU,EAAE,CAID,CACF;AACL","names":["padZipWith","identity","tuple","Semialign","align","F","fb","alignWith","f","alignCombine","that","S","th","tsplus_module_1","a","b","combine","padZip","padZipWith_1","tsplus_module_2","zipAll","x"],"sourceRoot":"","sources":["../../_src/typeclass/Semialign.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/typeclass/Witherable.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/Maybe/constructors";
|
2
3
|
import { pipe } from "@fncts/base/data/function";
|
3
4
|
export const Witherable = {};
|
@@ -5,6 +6,6 @@ export const Witherable = {};
|
|
5
6
|
* @tsplus static fncts.WitherableOps filterA
|
6
7
|
*/
|
7
8
|
export function filterA(F) {
|
8
|
-
return G => p => F.wither(G)(a => G.map(bb => bb ? tsplus_module_1.just(a) : tsplus_module_1.nothing())(p(a)));
|
9
|
+
return G => p => F.wither(G)(a => G.map(bb => bb ? tsplus_module_1.just(a, fileName_1 + ":62:33") : tsplus_module_1.nothing(fileName_1 + ":62:46"))(p(a)));
|
9
10
|
}
|
10
11
|
//# sourceMappingURL=Witherable.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Witherable.mjs","mappings":"
|
1
|
+
{"version":3,"file":"Witherable.mjs","mappings":";;AAIA,SAASA,IAAI,QAAQ,2BAA2B;AAuChD,OAAO,MAAMC,UAAU,GAAkB,EAAE;AAE3C;;;AAGA,OAAM,SAAUC,OAAO,CACrBC,CAAoB;EAQpB,OAAQC,CAAC,IAAMC,CAAC,IACdF,CAAC,CAACG,MAAM,CAACF,CAAC,CAAC,CAAEG,CAAC,IAGVH,CAAC,CAACI,GAAG,CAAEC,EAAE,IAAMA,EAAE,GAAGC,qBAAKH,CAAC,wBAAC,GAAGG,8CAAU,CAAC,CADzCL,CAAC,CAACE,CAAC,CAAC,CAEL,CACF;AACL","names":["pipe","Witherable","filterA","F","G","p","wither","a","map","bb","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/typeclass/Witherable.ts"],"sourcesContent":[null]}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
const fileName_1 = "(@fncts/base) src/typeclass/WitherableWithIndex.ts";
|
1
2
|
import * as tsplus_module_1 from "@fncts/base/data/Maybe/constructors";
|
2
3
|
import { pipe } from "@fncts/base/data/function";
|
3
4
|
export const WitherableWithIndex = {};
|
@@ -8,6 +9,6 @@ export function makeWiltWithIndex() {
|
|
8
9
|
return i => i();
|
9
10
|
}
|
10
11
|
export function filterWithIndexA(F) {
|
11
|
-
return G => p => F.witherWithIndex(G)((i, a) => G.map(bb => bb ? tsplus_module_1.just(a) : tsplus_module_1.nothing())(p(i, a)));
|
12
|
+
return G => p => F.witherWithIndex(G)((i, a) => G.map(bb => bb ? tsplus_module_1.just(a, fileName_1 + ":124:33") : tsplus_module_1.nothing(fileName_1 + ":124:46"))(p(i, a)));
|
12
13
|
}
|
13
14
|
//# sourceMappingURL=WitherableWithIndex.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WitherableWithIndex.mjs","mappings":"
|
1
|
+
{"version":3,"file":"WitherableWithIndex.mjs","mappings":";;AAKA,SAASA,IAAI,QAAQ,2BAA2B;AA2ChD,OAAO,MAAMC,mBAAmB,GAA2B,EAAE;AA0B7D,OAAM,SAAUC,mBAAmB;EACjC,OAAQC,CAAM,IAAKA,CAAC,EAAE;AACxB;AA8BA,OAAM,SAAUC,iBAAiB;EAC/B,OAAQD,CAAM,IAAKA,CAAC,EAAE;AACxB;AAEA,OAAM,SAAUE,gBAAgB,CAC9BC,CAA6B;EAQ7B,OAAQC,CAAC,IAAMC,CAAC,IACdF,CAAC,CAACG,eAAe,CAACF,CAAC,CAAC,CAAC,CAACJ,CAAC,EAAEO,CAAC,KAGtBH,CAAC,CAACI,GAAG,CAAEC,EAAE,IAAMA,EAAE,GAAGC,qBAAKH,CAAC,yBAAC,GAAGG,+CAAU,CAAC,CADzCL,CAAC,CAACL,CAAC,EAAEO,CAAC,CAAC,CAER,CACF;AACL","names":["pipe","WitherableWithIndex","makeWitherWithIndex","i","makeWiltWithIndex","filterWithIndexA","F","G","p","witherWithIndex","a","map","bb","tsplus_module_1"],"sourceRoot":"","sources":["../../_src/typeclass/WitherableWithIndex.ts"],"sourcesContent":[null]}
|
package/_mjs/types.mjs
CHANGED
package/_mjs/types.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.mjs","mappings":"AAAA;AACA,cAAc,yBAAwB;AACtC,cAAc,
|
1
|
+
{"version":3,"file":"types.mjs","mappings":"AAAA;AACA,cAAc,yBAAwB;AACtC,cAAc,qBAAoB","names":[],"sourceRoot":"","sources":["../_src/types.ts"],"sourcesContent":[null]}
|
@@ -951,6 +951,18 @@ export function separate<E, A>(self: Conc<Either<E, A>>): readonly [Conc<E>, Con
|
|
951
951
|
return self.partitionMap(identity);
|
952
952
|
}
|
953
953
|
|
954
|
+
/**
|
955
|
+
* @tsplus pipeable fncts.Conc slice
|
956
|
+
*/
|
957
|
+
export function slice(from: number, to: number) {
|
958
|
+
return <A>(self: Conc<A>): Conc<A> => {
|
959
|
+
concrete(self);
|
960
|
+
const start = from < 0 ? 0 : from > self.length ? self.length : from;
|
961
|
+
const end = to < start ? start : to > self.length ? self.length : to;
|
962
|
+
return new Slice(self, start, end - start);
|
963
|
+
};
|
964
|
+
}
|
965
|
+
|
954
966
|
/**
|
955
967
|
* @tsplus pipeable fncts.Conc splitAt
|
956
968
|
*/
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* @tsplus type fncts.CompletablePromise
|
3
|
+
* @tsplus companion fncts.CompletablePromiseOps
|
4
|
+
*/
|
5
|
+
export interface CompletablePromise<A> extends Promise<A> {
|
6
|
+
resolve: (a: A) => void;
|
7
|
+
reject: (reason: unknown) => void;
|
8
|
+
}
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @tsplus static fncts.CompletablePromiseOps __call
|
12
|
+
*/
|
13
|
+
export function make<A>(): CompletablePromise<A> {
|
14
|
+
let outerResolve: (a: A) => void = () => {};
|
15
|
+
let outerReject: (reason: unknown) => void = () => {};
|
16
|
+
const promise: CompletablePromise<A> = new Promise((resolve, reject) => {
|
17
|
+
outerResolve = resolve;
|
18
|
+
outerReject = reject;
|
19
|
+
}) as any;
|
20
|
+
promise.resolve = outerResolve;
|
21
|
+
promise.reject = outerReject;
|
22
|
+
return promise;
|
23
|
+
}
|
package/_src/control.ts
CHANGED
@@ -6,16 +6,16 @@ import { Either, Left, Right } from "./definition.js";
|
|
6
6
|
* @tsplus static fncts.EitherOps left
|
7
7
|
* @tsplus static fncts.Either.LeftOps __call
|
8
8
|
*/
|
9
|
-
export function left<E = never, A = never>(e: E): Either<E, A> {
|
10
|
-
return new Left(e);
|
9
|
+
export function left<E = never, A = never>(e: E, __tsplusTrace?: string): Either<E, A> {
|
10
|
+
return new Left(e, __tsplusTrace);
|
11
11
|
}
|
12
12
|
|
13
13
|
/**
|
14
14
|
* @tsplus static fncts.EitherOps right
|
15
15
|
* @tsplus static fncts.Either.RightOps __call
|
16
16
|
*/
|
17
|
-
export function right<E = never, A = never>(a: A): Either<E, A> {
|
18
|
-
return new Right(a);
|
17
|
+
export function right<E = never, A = never>(a: A, __tsplusTrace?: string): Either<E, A> {
|
18
|
+
return new Right(a, __tsplusTrace);
|
19
19
|
}
|
20
20
|
|
21
21
|
/**
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { EqualsContext } from "@fncts/base/data/Equatable";
|
2
|
+
|
1
3
|
export const enum EitherTag {
|
2
4
|
Left = "Left",
|
3
5
|
Right = "Right",
|
@@ -17,12 +19,17 @@ export interface EitherF extends HKT {
|
|
17
19
|
};
|
18
20
|
}
|
19
21
|
|
22
|
+
const IOTypeId = Symbol.for("fncts.io.IO");
|
23
|
+
type IOTypeId = typeof IOTypeId;
|
24
|
+
|
20
25
|
/**
|
21
26
|
* @tsplus type fncts.Either
|
22
27
|
* @tsplus companion fncts.EitherOps
|
23
28
|
*/
|
24
29
|
export class Either<E, A> {
|
25
30
|
readonly [EitherTypeId]: EitherTypeId = EitherTypeId;
|
31
|
+
readonly [IOTypeId]: IOTypeId = IOTypeId;
|
32
|
+
readonly trace?: string | undefined = undefined;
|
26
33
|
declare [EitherVariance]: {
|
27
34
|
readonly _E: (_: never) => E;
|
28
35
|
readonly _A: (_: never) => A;
|
@@ -37,7 +44,7 @@ const leftHash = Hashable.string(EitherTag.Left);
|
|
37
44
|
*/
|
38
45
|
export class Left<E> extends Either<E, never> {
|
39
46
|
readonly _tag = EitherTag.Left;
|
40
|
-
constructor(readonly left: E) {
|
47
|
+
constructor(readonly left: E, readonly trace?: string) {
|
41
48
|
super();
|
42
49
|
}
|
43
50
|
|
@@ -45,8 +52,8 @@ export class Left<E> extends Either<E, never> {
|
|
45
52
|
return Hashable.combine(leftHash, Hashable.unknown(this.left));
|
46
53
|
}
|
47
54
|
|
48
|
-
[Symbol.equals](that: unknown): boolean {
|
49
|
-
return Either.isEither(that) && that.isLeft() &&
|
55
|
+
[Symbol.equals](that: unknown, context: EqualsContext): boolean {
|
56
|
+
return Either.isEither(that) && that.isLeft() && context.comparator(this.left, that.left);
|
50
57
|
}
|
51
58
|
}
|
52
59
|
|
@@ -58,7 +65,7 @@ const rightHash = Hashable.string(EitherTag.Right);
|
|
58
65
|
*/
|
59
66
|
export class Right<A> extends Either<never, A> {
|
60
67
|
readonly _tag = EitherTag.Right;
|
61
|
-
constructor(readonly right: A) {
|
68
|
+
constructor(readonly right: A, readonly trace?: string) {
|
62
69
|
super();
|
63
70
|
}
|
64
71
|
|
@@ -66,8 +73,8 @@ export class Right<A> extends Either<never, A> {
|
|
66
73
|
return Hashable.combine(rightHash, Hashable.unknown(this.left));
|
67
74
|
}
|
68
75
|
|
69
|
-
[Symbol.equals](that: unknown): boolean {
|
70
|
-
return Either.isEither(that) && that.isRight() &&
|
76
|
+
[Symbol.equals](that: unknown, context: EqualsContext): boolean {
|
77
|
+
return Either.isEither(that) && that.isRight() && context.comparator(this.right, that.right);
|
71
78
|
}
|
72
79
|
}
|
73
80
|
|