@fncts/base 0.0.26 → 0.0.28
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/_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 +20 -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 +9 -7
- 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/List/definition.cjs +19 -4
- package/_cjs/collection/immutable/List/definition.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/RoseTree/api.cjs +1 -1
- package/_cjs/collection/immutable/RoseTree/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/immutable/Vector/api.cjs +62 -19
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.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/Branded/definition.cjs +4 -3
- package/_cjs/data/Branded/definition.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 +124 -128
- 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 +25 -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 +34 -6
- 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 +39 -11
- 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/FiberId/api.cjs +16 -15
- package/_cjs/data/FiberId/api.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 +30 -8
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Showable/show.cjs +2 -2
- package/_cjs/data/Showable/show.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/typeclass.cjs +2 -2
- package/_cjs/types.cjs +0 -11
- package/_cjs/types.cjs.map +1 -1
- package/_cjs/util/predicates.cjs +4 -0
- package/_cjs/util/predicates.cjs.map +1 -1
- package/_cjs/util/rand/Random.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 +19 -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 +8 -7
- 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/List/definition.mjs +13 -2
- package/_mjs/collection/immutable/List/definition.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/RoseTree/api.mjs +1 -1
- package/_mjs/collection/immutable/RoseTree/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/immutable/Vector/api.mjs +54 -16
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.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/Branded/definition.mjs +4 -3
- package/_mjs/data/Branded/definition.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 +123 -127
- 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 +22 -15
- 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 +30 -4
- 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 +35 -8
- 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/FiberId/api.mjs +16 -15
- package/_mjs/data/FiberId/api.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 +30 -8
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Showable/show.mjs +2 -2
- package/_mjs/data/Showable/show.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/typeclass.mjs +1 -1
- package/_mjs/typeclass.mjs.map +1 -1
- package/_mjs/types.mjs +0 -1
- package/_mjs/types.mjs.map +1 -1
- package/_mjs/util/predicates.mjs +3 -0
- package/_mjs/util/predicates.mjs.map +1 -1
- package/_mjs/util/rand/Random.mjs +2 -1
- package/_mjs/util/rand/Random.mjs.map +1 -1
- package/_src/collection/immutable/Conc/api.ts +12 -0
- package/_src/collection/immutable/HashMap/api.ts +11 -0
- package/_src/collection/immutable/HashMap/internal.ts +1 -1
- package/_src/collection/immutable/HashSet/api.ts +4 -4
- package/_src/collection/immutable/List/definition.ts +14 -2
- package/_src/collection/immutable/RoseTree/api.ts +1 -1
- package/_src/collection/immutable/Vector/api.ts +64 -2
- package/_src/collection/immutable/Vector/definition.ts +1 -0
- package/_src/control/CompletablePromise.ts +23 -0
- package/_src/control.ts +1 -0
- package/_src/data/Branded/definition.ts +3 -3
- package/_src/data/Cause/api.ts +33 -40
- package/_src/data/Either/api.ts +10 -0
- package/_src/data/Either/constructors.ts +4 -4
- package/_src/data/Either/definition.ts +29 -2
- package/_src/data/Eq/api.ts +8 -0
- package/_src/data/Eq.ts +1 -0
- package/_src/data/Equatable/api.ts +33 -8
- 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/FiberId/api.ts +5 -5
- package/_src/data/Maybe/constructors.ts +4 -6
- package/_src/data/Maybe/definition.ts +9 -1
- package/_src/data/Maybe/instances.ts +18 -0
- package/_src/data/Showable/show.ts +2 -2
- 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/data.ts +1 -0
- package/_src/typeclass.ts +1 -1
- package/_src/types.ts +0 -1
- package/_src/util/predicates.ts +4 -0
- package/collection/immutable/Conc/api.d.ts +5 -0
- package/collection/immutable/HashMap/api.d.ts +5 -0
- package/collection/immutable/HashMap/internal.d.ts +1 -2
- package/collection/immutable/List/definition.d.ts +9 -0
- package/collection/immutable/Vector/api.d.ts +30 -3
- package/collection/immutable/Vector/definition.d.ts +1 -0
- package/control/CompletablePromise.d.ts +13 -0
- package/control.d.ts +1 -0
- package/data/Branded/definition.d.ts +3 -2
- package/data/Cause/api.d.ts +1 -1
- package/data/Either/api.d.ts +5 -0
- package/data/Either/constructors.d.ts +2 -2
- package/data/Either/definition.d.ts +15 -2
- package/data/Eq/api.d.ts +6 -0
- package/data/Eq.d.ts +1 -0
- package/data/Equatable/api.d.ts +7 -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/Maybe/instances.d.ts +24 -0
- package/data/exceptions/IOError.d.ts +9 -0
- package/data/exceptions/NoSuchElementError.d.ts +1 -1
- package/data/exceptions.d.ts +1 -0
- package/data.d.ts +1 -0
- package/package.json +1 -1
- package/typeclass.d.ts +1 -1
- package/types.d.ts +0 -1
- package/util/predicates.d.ts +1 -0
- 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/_cjs/data/Cause/api.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.as = as;
|
|
7
7
|
exports.both = void 0;
|
|
8
8
|
exports.contains = contains;
|
|
9
9
|
exports.failureMaybe = exports.failed = exports.fail = exports.empty = exports.defects = void 0;
|
|
@@ -37,10 +37,10 @@ exports.stripFailures = stripFailures;
|
|
|
37
37
|
exports.stripSomeDefects = stripSomeDefects;
|
|
38
38
|
exports.traced = exports.then = void 0;
|
|
39
39
|
exports.untraced = untraced;
|
|
40
|
-
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
41
|
-
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/control/Eval/
|
|
42
|
-
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/
|
|
43
|
-
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/control/Eval/
|
|
40
|
+
var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Cause/api/isEmpty"));
|
|
41
|
+
var tsplus_module_2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/control/Eval/run"));
|
|
42
|
+
var tsplus_module_3 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/control/Eval/constructors"));
|
|
43
|
+
var tsplus_module_4 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/control/Eval/api"));
|
|
44
44
|
var tsplus_module_5 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/data/Maybe/constructors"));
|
|
45
45
|
var tsplus_module_6 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/List/constructors"));
|
|
46
46
|
var tsplus_module_7 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@fncts/base/collection/immutable/List/api"));
|
|
@@ -64,6 +64,7 @@ var _function = /*#__PURE__*/require("../function.cjs");
|
|
|
64
64
|
var _definition3 = /*#__PURE__*/require("./definition.cjs");
|
|
65
65
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
66
66
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
67
|
+
const fileName_1 = "(@fncts/base) src/data/Cause/api.ts";
|
|
67
68
|
const both = both_1;
|
|
68
69
|
exports.both = both;
|
|
69
70
|
const flatMap = flatMap_1;
|
|
@@ -117,32 +118,11 @@ exports.traced = traced;
|
|
|
117
118
|
/**
|
|
118
119
|
* @tsplus pipeable fncts.Cause as
|
|
119
120
|
*/
|
|
120
|
-
function
|
|
121
|
+
function as(b) {
|
|
121
122
|
return self => {
|
|
122
123
|
return map_1(() => b())(self);
|
|
123
124
|
};
|
|
124
125
|
}
|
|
125
|
-
/**
|
|
126
|
-
* @internal
|
|
127
|
-
*/
|
|
128
|
-
function chainEval(self, f) {
|
|
129
|
-
switch (self._tag) {
|
|
130
|
-
case "Empty" /* CauseTag.Empty */:
|
|
131
|
-
return tsplus_module_1.now(empty_1());
|
|
132
|
-
case "Fail" /* CauseTag.Fail */:
|
|
133
|
-
return tsplus_module_1.now(traced_1(f(self.value), self.trace));
|
|
134
|
-
case "Halt" /* CauseTag.Halt */:
|
|
135
|
-
return tsplus_module_1.now(self);
|
|
136
|
-
case "Interrupt" /* CauseTag.Interrupt */:
|
|
137
|
-
return tsplus_module_1.now(self);
|
|
138
|
-
case "Then" /* CauseTag.Then */:
|
|
139
|
-
return tsplus_module_2.zipWith(tsplus_module_1.defer(() => chainEval(self.right, f)), then_1)(tsplus_module_1.defer(() => chainEval(self.left, f)));
|
|
140
|
-
case "Both" /* CauseTag.Both */:
|
|
141
|
-
return tsplus_module_2.zipWith(tsplus_module_1.defer(() => chainEval(self.right, f)), both_1)(tsplus_module_1.defer(() => chainEval(self.left, f)));
|
|
142
|
-
case "Stackless" /* CauseTag.Stackless */:
|
|
143
|
-
return tsplus_module_1.defer(() => chainEval(self.cause, f));
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
126
|
/**
|
|
147
127
|
* Constructs a `Cause` from two `Cause`s, representing parallel failures.
|
|
148
128
|
*
|
|
@@ -152,7 +132,7 @@ function chainEval(self, f) {
|
|
|
152
132
|
* @tsplus static fncts.Cause.BothOps __call
|
|
153
133
|
*/
|
|
154
134
|
function both_1(left, right) {
|
|
155
|
-
return
|
|
135
|
+
return tsplus_module_1.isEmpty(left) ? right : tsplus_module_1.isEmpty(right) ? left : new _definition3.Both(left, right);
|
|
156
136
|
}
|
|
157
137
|
/**
|
|
158
138
|
* Composes computations in sequence, using the return value of one computation as input for the next
|
|
@@ -161,9 +141,30 @@ function both_1(left, right) {
|
|
|
161
141
|
*/
|
|
162
142
|
function flatMap_1(f) {
|
|
163
143
|
return self => {
|
|
164
|
-
return
|
|
144
|
+
return tsplus_module_2.run(flatMapEval(self, f));
|
|
165
145
|
};
|
|
166
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
function flatMapEval(self, f) {
|
|
151
|
+
switch (self._tag) {
|
|
152
|
+
case "Empty" /* CauseTag.Empty */:
|
|
153
|
+
return tsplus_module_3.now(empty_1());
|
|
154
|
+
case "Fail" /* CauseTag.Fail */:
|
|
155
|
+
return tsplus_module_3.now(traced_1(f(self.value), self.trace));
|
|
156
|
+
case "Halt" /* CauseTag.Halt */:
|
|
157
|
+
return tsplus_module_3.now(self);
|
|
158
|
+
case "Interrupt" /* CauseTag.Interrupt */:
|
|
159
|
+
return tsplus_module_3.now(self);
|
|
160
|
+
case "Then" /* CauseTag.Then */:
|
|
161
|
+
return tsplus_module_4.zipWith(tsplus_module_3.defer(() => flatMapEval(self.right, f)), then_1)(tsplus_module_3.defer(() => flatMapEval(self.left, f)));
|
|
162
|
+
case "Both" /* CauseTag.Both */:
|
|
163
|
+
return tsplus_module_4.zipWith(tsplus_module_3.defer(() => flatMapEval(self.right, f)), both_1)(tsplus_module_3.defer(() => flatMapEval(self.left, f)));
|
|
164
|
+
case "Stackless" /* CauseTag.Stackless */:
|
|
165
|
+
return tsplus_module_3.defer(() => flatMapEval(self.cause, f));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
167
168
|
/**
|
|
168
169
|
* Determines whether a `Cause` contains or is equal to the specified cause.
|
|
169
170
|
*
|
|
@@ -171,19 +172,14 @@ function flatMap_1(f) {
|
|
|
171
172
|
*/
|
|
172
173
|
function contains(that) {
|
|
173
174
|
return self => {
|
|
174
|
-
return
|
|
175
|
+
return tsplus_module_2.run(containsEval(self, that));
|
|
175
176
|
};
|
|
176
177
|
}
|
|
177
178
|
/**
|
|
178
179
|
* @internal
|
|
179
180
|
*/
|
|
180
181
|
function containsEval(self, that) {
|
|
181
|
-
return
|
|
182
|
-
if (yield* _(self.equalsEval(that))) {
|
|
183
|
-
return true;
|
|
184
|
-
}
|
|
185
|
-
return yield* _(foldLeft_1(tsplus_module_1.now(false), (computation, c) => tsplus_module_5.just(tsplus_module_2.flatMap(b => b ? tsplus_module_1.now(b) : c.equalsEval(that))(computation)))(self));
|
|
186
|
-
});
|
|
182
|
+
return foldLeft_1(self.equalsEval(that), (computation, innerCause) => tsplus_module_5.just(tsplus_module_4.flatMap(b => b ? tsplus_module_3.now(b) : innerCause.equalsEval(that))(computation), fileName_1 + ":83:9"))(self);
|
|
187
183
|
}
|
|
188
184
|
/**
|
|
189
185
|
* Extracts a list of non-recoverable errors from the `Cause`.
|
|
@@ -191,7 +187,7 @@ function containsEval(self, that) {
|
|
|
191
187
|
* @tsplus getter fncts.Cause defects
|
|
192
188
|
*/
|
|
193
189
|
function defects_1(self) {
|
|
194
|
-
return tsplus_module_7.reverse(foldLeft_1(tsplus_module_6.empty(), (z, c) => isHalt_1(c) ? tsplus_module_5.just(tsplus_module_7.prependOperator(c.value, z)) : tsplus_module_5.nothing())(self));
|
|
190
|
+
return tsplus_module_7.reverse(foldLeft_1(tsplus_module_6.empty(), (z, c) => isHalt_1(c) ? tsplus_module_5.just(tsplus_module_7.prependOperator(c.value, z), fileName_1 + ":93:66") : tsplus_module_5.nothing(fileName_1 + ":93:89"))(self));
|
|
195
191
|
}
|
|
196
192
|
/**
|
|
197
193
|
* The empty `Cause`
|
|
@@ -225,7 +221,7 @@ function failed_1(self) {
|
|
|
225
221
|
* @tsplus getter fncts.Cause failures
|
|
226
222
|
*/
|
|
227
223
|
function failures(self) {
|
|
228
|
-
return tsplus_module_7.reverse(foldLeft_1(tsplus_module_6.empty(), (z, c) => isFail_1(c) ? tsplus_module_5.just(tsplus_module_7.prependOperator(c.value, z)) : tsplus_module_5.nothing())(self));
|
|
224
|
+
return tsplus_module_7.reverse(foldLeft_1(tsplus_module_6.empty(), (z, c) => isFail_1(c) ? tsplus_module_5.just(tsplus_module_7.prependOperator(c.value, z), fileName_1 + ":134:69") : tsplus_module_5.nothing(fileName_1 + ":134:92"))(self));
|
|
229
225
|
}
|
|
230
226
|
/**
|
|
231
227
|
* Retrieve the first checked error on the `Left` if available,
|
|
@@ -235,7 +231,7 @@ function failures(self) {
|
|
|
235
231
|
* @tsplus getter fncts.Cause failureOrCause
|
|
236
232
|
*/
|
|
237
233
|
function failureOrCause(self) {
|
|
238
|
-
return tsplus_module_9.match(() => tsplus_module_10.right(self), tsplus_module_10.left)(failureMaybe_1(self));
|
|
234
|
+
return tsplus_module_9.match(() => tsplus_module_10.right(self, fileName_1 + ":145:52"), tsplus_module_10.left)(failureMaybe_1(self));
|
|
239
235
|
}
|
|
240
236
|
/**
|
|
241
237
|
* Returns the `E` associated with the first `Fail` in this `Cause` if one
|
|
@@ -244,7 +240,7 @@ function failureOrCause(self) {
|
|
|
244
240
|
* @tsplus getter fncts.Cause failureTraceMaybe
|
|
245
241
|
*/
|
|
246
242
|
function failureTraceMaybe_1(self) {
|
|
247
|
-
return find_1(c => isFail_1(c) ? tsplus_module_5.just([c.value, c.trace]) : tsplus_module_5.nothing())(self);
|
|
243
|
+
return find_1(c => isFail_1(c) ? tsplus_module_5.just([c.value, c.trace], fileName_1 + ":155:50") : tsplus_module_5.nothing(fileName_1 + ":155:86"))(self);
|
|
248
244
|
}
|
|
249
245
|
/**
|
|
250
246
|
* Retrieve the first checked error and its trace on the `Left` if available,
|
|
@@ -254,7 +250,7 @@ function failureTraceMaybe_1(self) {
|
|
|
254
250
|
* @tsplus getter fncts.Cause failureTraceOrCause
|
|
255
251
|
*/
|
|
256
252
|
function failureTraceOrCause(self) {
|
|
257
|
-
return tsplus_module_9.match(() => tsplus_module_10.right(self), tsplus_module_10.left)(failureTraceMaybe_1(self));
|
|
253
|
+
return tsplus_module_9.match(() => tsplus_module_10.right(self, fileName_1 + ":166:57"), tsplus_module_10.left)(failureTraceMaybe_1(self));
|
|
258
254
|
}
|
|
259
255
|
/**
|
|
260
256
|
* Returns the `E` associated with the first `Fail` in this `Cause` if one exists.
|
|
@@ -262,7 +258,7 @@ function failureTraceOrCause(self) {
|
|
|
262
258
|
* @tsplus getter fncts.Cause failureMaybe
|
|
263
259
|
*/
|
|
264
260
|
function failureMaybe_1(self) {
|
|
265
|
-
return find_1(c => c._tag === "Fail" /* CauseTag.Fail */ ? tsplus_module_5.just(c.value) : tsplus_module_5.nothing())(self);
|
|
261
|
+
return find_1(c => c._tag === "Fail" /* CauseTag.Fail */ ? tsplus_module_5.just(c.value, fileName_1 + ":175:65") : tsplus_module_5.nothing(fileName_1 + ":175:90"))(self);
|
|
266
262
|
}
|
|
267
263
|
/**
|
|
268
264
|
* Remove all `Halt` causes that the specified partial function is defined at,
|
|
@@ -274,30 +270,30 @@ function failureMaybe_1(self) {
|
|
|
274
270
|
function filterDefects(p) {
|
|
275
271
|
return self => {
|
|
276
272
|
return tsplus_module_13.fold({
|
|
277
|
-
Empty: () => tsplus_module_5.just(empty_1()),
|
|
278
|
-
Fail: (e, trace) => tsplus_module_5.just(fail_1(e, trace)),
|
|
279
|
-
Halt: (u, trace) => p(u) ? tsplus_module_5.nothing() : tsplus_module_5.just(halt_1(u, trace)),
|
|
280
|
-
Interrupt: (fiberId, trace) => tsplus_module_5.just(interrupt_1(fiberId, trace)),
|
|
273
|
+
Empty: () => tsplus_module_5.just(empty_1(), fileName_1 + ":188:24"),
|
|
274
|
+
Fail: (e, trace) => tsplus_module_5.just(fail_1(e, trace), fileName_1 + ":189:31"),
|
|
275
|
+
Halt: (u, trace) => p(u) ? tsplus_module_5.nothing(fileName_1 + ":190:42") : tsplus_module_5.just(halt_1(u, trace), fileName_1 + ":190:51"),
|
|
276
|
+
Interrupt: (fiberId, trace) => tsplus_module_5.just(interrupt_1(fiberId, trace), fileName_1 + ":191:42"),
|
|
281
277
|
Then: (l, r) => {
|
|
282
278
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r)) {
|
|
283
|
-
return tsplus_module_5.just(then_1(l.value, r.value));
|
|
279
|
+
return tsplus_module_5.just(then_1(l.value, r.value), fileName_1 + ":194:22");
|
|
284
280
|
} else if (tsplus_module_11.isJust(l) && tsplus_module_11.isNothing(r)) {
|
|
285
|
-
return tsplus_module_5.just(l.value);
|
|
281
|
+
return tsplus_module_5.just(l.value, fileName_1 + ":196:22");
|
|
286
282
|
} else if (tsplus_module_11.isNothing(l) && tsplus_module_11.isJust(r)) {
|
|
287
|
-
return tsplus_module_5.just(r.value);
|
|
283
|
+
return tsplus_module_5.just(r.value, fileName_1 + ":198:22");
|
|
288
284
|
} else {
|
|
289
|
-
return tsplus_module_5.nothing();
|
|
285
|
+
return tsplus_module_5.nothing(fileName_1 + ":200:25");
|
|
290
286
|
}
|
|
291
287
|
},
|
|
292
288
|
Both: (l, r) => {
|
|
293
289
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r)) {
|
|
294
|
-
return tsplus_module_5.just(both_1(l.value, r.value));
|
|
290
|
+
return tsplus_module_5.just(both_1(l.value, r.value), fileName_1 + ":205:22");
|
|
295
291
|
} else if (tsplus_module_11.isJust(l) && tsplus_module_11.isNothing(r)) {
|
|
296
|
-
return tsplus_module_5.just(l.value);
|
|
292
|
+
return tsplus_module_5.just(l.value, fileName_1 + ":207:22");
|
|
297
293
|
} else if (tsplus_module_11.isNothing(l) && tsplus_module_11.isJust(r)) {
|
|
298
|
-
return tsplus_module_5.just(r.value);
|
|
294
|
+
return tsplus_module_5.just(r.value, fileName_1 + ":209:22");
|
|
299
295
|
} else {
|
|
300
|
-
return tsplus_module_5.nothing();
|
|
296
|
+
return tsplus_module_5.nothing(fileName_1 + ":211:25");
|
|
301
297
|
}
|
|
302
298
|
},
|
|
303
299
|
Stackless: (causeOption, stackless) => tsplus_module_12.map(cause => stackless_1(cause, stackless))(causeOption)
|
|
@@ -343,7 +339,7 @@ function findLoop(self, f, stack) {
|
|
|
343
339
|
stack_1 = stack_2;
|
|
344
340
|
continue;
|
|
345
341
|
}
|
|
346
|
-
return tsplus_module_5.nothing();
|
|
342
|
+
return tsplus_module_5.nothing(fileName_1 + ":236:25");
|
|
347
343
|
}
|
|
348
344
|
}
|
|
349
345
|
}
|
|
@@ -417,16 +413,16 @@ function flipCauseEither(self) {
|
|
|
417
413
|
pushing: while (true) {
|
|
418
414
|
switch (c._tag) {
|
|
419
415
|
case "Empty" /* CauseTag.Empty */:
|
|
420
|
-
result = tsplus_module_10.left(empty_1());
|
|
416
|
+
result = tsplus_module_10.left(empty_1(), fileName_1 + ":316:31");
|
|
421
417
|
break pushing;
|
|
422
418
|
case "Interrupt" /* CauseTag.Interrupt */:
|
|
423
|
-
result = tsplus_module_10.left(interrupt_1(c.id, c.trace));
|
|
419
|
+
result = tsplus_module_10.left(interrupt_1(c.id, c.trace), fileName_1 + ":319:31");
|
|
424
420
|
break pushing;
|
|
425
421
|
case "Halt" /* CauseTag.Halt */:
|
|
426
|
-
result = tsplus_module_10.left(c);
|
|
422
|
+
result = tsplus_module_10.left(c, fileName_1 + ":322:31");
|
|
427
423
|
break pushing;
|
|
428
424
|
case "Fail" /* CauseTag.Fail */:
|
|
429
|
-
result = tsplus_module_17.match(l => tsplus_module_10.left(fail_1(l, tsplus_module_8.none)), r => tsplus_module_10.right(r))(c.value);
|
|
425
|
+
result = tsplus_module_17.match(l => tsplus_module_10.left(fail_1(l, tsplus_module_8.none), fileName_1 + ":326:31"), r => tsplus_module_10.right(r, fileName_1 + ":327:32"))(c.value);
|
|
430
426
|
break pushing;
|
|
431
427
|
case "Then" /* CauseTag.Then */:
|
|
432
428
|
stack.push(new FCEStackFrameThenLeft(c));
|
|
@@ -452,13 +448,13 @@ function flipCauseEither(self) {
|
|
|
452
448
|
{
|
|
453
449
|
const l = top.leftResult;
|
|
454
450
|
if (tsplus_module_18.isLeft(l) && tsplus_module_18.isLeft(result)) {
|
|
455
|
-
result = tsplus_module_10.left(then_1(l.left, result.left));
|
|
451
|
+
result = tsplus_module_10.left(then_1(l.left, result.left), fileName_1 + ":356:33");
|
|
456
452
|
}
|
|
457
453
|
if (tsplus_module_18.isRight(l)) {
|
|
458
|
-
result = tsplus_module_10.right(l.right);
|
|
454
|
+
result = tsplus_module_10.right(l.right, fileName_1 + ":360:34");
|
|
459
455
|
}
|
|
460
456
|
if (tsplus_module_18.isRight(result)) {
|
|
461
|
-
result = tsplus_module_10.right(result.right);
|
|
457
|
+
result = tsplus_module_10.right(result.right, fileName_1 + ":364:34");
|
|
462
458
|
}
|
|
463
459
|
continue popping;
|
|
464
460
|
}
|
|
@@ -470,13 +466,13 @@ function flipCauseEither(self) {
|
|
|
470
466
|
{
|
|
471
467
|
const l = top.leftResult;
|
|
472
468
|
if (tsplus_module_18.isLeft(l) && tsplus_module_18.isLeft(result)) {
|
|
473
|
-
result = tsplus_module_10.left(both_1(l.left, result.left));
|
|
469
|
+
result = tsplus_module_10.left(both_1(l.left, result.left), fileName_1 + ":377:33");
|
|
474
470
|
}
|
|
475
471
|
if (tsplus_module_18.isRight(l)) {
|
|
476
|
-
result = tsplus_module_10.right(l.right);
|
|
472
|
+
result = tsplus_module_10.right(l.right, fileName_1 + ":381:34");
|
|
477
473
|
}
|
|
478
474
|
if (tsplus_module_18.isRight(result)) {
|
|
479
|
-
result = tsplus_module_10.right(result.right);
|
|
475
|
+
result = tsplus_module_10.right(result.right, fileName_1 + ":385:34");
|
|
480
476
|
}
|
|
481
477
|
continue popping;
|
|
482
478
|
}
|
|
@@ -532,16 +528,16 @@ function flipCauseOption(self) {
|
|
|
532
528
|
pushing: while (true) {
|
|
533
529
|
switch (c._tag) {
|
|
534
530
|
case "Empty" /* CauseTag.Empty */:
|
|
535
|
-
result = tsplus_module_5.just(empty_1());
|
|
531
|
+
result = tsplus_module_5.just(empty_1(), fileName_1 + ":449:24");
|
|
536
532
|
break pushing;
|
|
537
533
|
case "Interrupt" /* CauseTag.Interrupt */:
|
|
538
|
-
result = tsplus_module_5.just(interrupt_1(c.id, tsplus_module_8.none));
|
|
534
|
+
result = tsplus_module_5.just(interrupt_1(c.id, tsplus_module_8.none), fileName_1 + ":452:24");
|
|
539
535
|
break pushing;
|
|
540
536
|
case "Halt" /* CauseTag.Halt */:
|
|
541
|
-
result = tsplus_module_5.just(c);
|
|
537
|
+
result = tsplus_module_5.just(c, fileName_1 + ":455:24");
|
|
542
538
|
break pushing;
|
|
543
539
|
case "Fail" /* CauseTag.Fail */:
|
|
544
|
-
result = tsplus_module_9.match(() => tsplus_module_5.nothing(), r => tsplus_module_5.just(fail_1(r, tsplus_module_8.none)))(c.value);
|
|
540
|
+
result = tsplus_module_9.match(() => tsplus_module_5.nothing(fileName_1 + ":459:26"), r => tsplus_module_5.just(fail_1(r, tsplus_module_8.none), fileName_1 + ":460:24"))(c.value);
|
|
545
541
|
break pushing;
|
|
546
542
|
case "Then" /* CauseTag.Then */:
|
|
547
543
|
stack.push(new FCOStackFrameThenLeft(c));
|
|
@@ -567,15 +563,15 @@ function flipCauseOption(self) {
|
|
|
567
563
|
{
|
|
568
564
|
const l = top.leftResult;
|
|
569
565
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isJust(result)) {
|
|
570
|
-
result = tsplus_module_5.just(then_1(l.value, result.value));
|
|
566
|
+
result = tsplus_module_5.just(then_1(l.value, result.value), fileName_1 + ":489:26");
|
|
571
567
|
}
|
|
572
568
|
if (tsplus_module_11.isNothing(l) && tsplus_module_11.isJust(result)) {
|
|
573
|
-
result = tsplus_module_5.just(result.value);
|
|
569
|
+
result = tsplus_module_5.just(result.value, fileName_1 + ":493:26");
|
|
574
570
|
}
|
|
575
571
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isNothing(result)) {
|
|
576
|
-
result = tsplus_module_5.just(l.value);
|
|
572
|
+
result = tsplus_module_5.just(l.value, fileName_1 + ":497:26");
|
|
577
573
|
}
|
|
578
|
-
result = tsplus_module_5.nothing();
|
|
574
|
+
result = tsplus_module_5.nothing(fileName_1 + ":500:27");
|
|
579
575
|
continue popping;
|
|
580
576
|
}
|
|
581
577
|
case "FCOStackFrameBothLeft":
|
|
@@ -586,15 +582,15 @@ function flipCauseOption(self) {
|
|
|
586
582
|
{
|
|
587
583
|
const l = top.leftResult;
|
|
588
584
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isJust(result)) {
|
|
589
|
-
result = tsplus_module_5.just(both_1(l.value, result.value));
|
|
585
|
+
result = tsplus_module_5.just(both_1(l.value, result.value), fileName_1 + ":512:26");
|
|
590
586
|
}
|
|
591
587
|
if (tsplus_module_11.isNothing(l) && tsplus_module_11.isJust(result)) {
|
|
592
|
-
result = tsplus_module_5.just(result.value);
|
|
588
|
+
result = tsplus_module_5.just(result.value, fileName_1 + ":516:26");
|
|
593
589
|
}
|
|
594
590
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isNothing(result)) {
|
|
595
|
-
result = tsplus_module_5.just(l.value);
|
|
591
|
+
result = tsplus_module_5.just(l.value, fileName_1 + ":520:26");
|
|
596
592
|
}
|
|
597
|
-
result = tsplus_module_5.nothing();
|
|
593
|
+
result = tsplus_module_5.nothing(fileName_1 + ":523:27");
|
|
598
594
|
continue popping;
|
|
599
595
|
}
|
|
600
596
|
}
|
|
@@ -682,7 +678,7 @@ function halted_1(self) {
|
|
|
682
678
|
* @tsplus getter fncts.Cause haltMaybe
|
|
683
679
|
*/
|
|
684
680
|
function haltMaybe_1(self) {
|
|
685
|
-
return find_1(c => c._tag === "Halt" /* CauseTag.Halt */ ? tsplus_module_5.just(c.value) : tsplus_module_5.nothing())(self);
|
|
681
|
+
return find_1(c => c._tag === "Halt" /* CauseTag.Halt */ ? tsplus_module_5.just(c.value, fileName_1 + ":594:65") : tsplus_module_5.nothing(fileName_1 + ":594:90"))(self);
|
|
686
682
|
}
|
|
687
683
|
/**
|
|
688
684
|
* Constructs a `Cause` from an `Id`, representing an interruption of asynchronous computation
|
|
@@ -737,7 +733,7 @@ function isInterrupt_1(self) {
|
|
|
737
733
|
* @tsplus getter fncts.Cause isInterrupted
|
|
738
734
|
*/
|
|
739
735
|
function isInterrupted_1(self) {
|
|
740
|
-
return tsplus_module_11.isJust(find_1(cause => isInterrupt_1(cause) ? tsplus_module_5.just(cause) : tsplus_module_5.nothing())(self));
|
|
736
|
+
return tsplus_module_11.isJust(find_1(cause => isInterrupt_1(cause) ? tsplus_module_5.just(cause, fileName_1 + ":656:58") : tsplus_module_5.nothing(fileName_1 + ":656:75"))(self));
|
|
741
737
|
}
|
|
742
738
|
/**
|
|
743
739
|
* Determines if the `Cause` contains only interruptions and not any `Die` or
|
|
@@ -772,9 +768,9 @@ function isTraced(self) {
|
|
|
772
768
|
case "Halt" /* CauseTag.Halt */:
|
|
773
769
|
case "Fail" /* CauseTag.Fail */:
|
|
774
770
|
case "Interrupt" /* CauseTag.Interrupt */:
|
|
775
|
-
return cause.trace !== tsplus_module_8.none ? tsplus_module_5.just(undefined) : tsplus_module_5.nothing();
|
|
771
|
+
return cause.trace !== tsplus_module_8.none ? tsplus_module_5.just(undefined, fileName_1 + ":695:51") : tsplus_module_5.nothing(fileName_1 + ":695:72");
|
|
776
772
|
default:
|
|
777
|
-
return tsplus_module_5.nothing();
|
|
773
|
+
return tsplus_module_5.nothing(fileName_1 + ":697:25");
|
|
778
774
|
}
|
|
779
775
|
})(self));
|
|
780
776
|
}
|
|
@@ -792,7 +788,7 @@ function interrupted(self) {
|
|
|
792
788
|
* @tsplus getter fncts.Cause interruptOption
|
|
793
789
|
*/
|
|
794
790
|
function interruptOption_1(self) {
|
|
795
|
-
return find_1(c => c._tag === "Interrupt" /* CauseTag.Interrupt */ ? tsplus_module_5.just(c.id) : tsplus_module_5.nothing())(self);
|
|
791
|
+
return find_1(c => c._tag === "Interrupt" /* CauseTag.Interrupt */ ? tsplus_module_5.just(c.id, fileName_1 + ":721:64") : tsplus_module_5.nothing(fileName_1 + ":721:80"))(self);
|
|
796
792
|
}
|
|
797
793
|
/**
|
|
798
794
|
* Returns a set of interruptors, fibers that interrupted the fiber described
|
|
@@ -801,7 +797,7 @@ function interruptOption_1(self) {
|
|
|
801
797
|
* @tsplus getter fncts.Cause interruptors
|
|
802
798
|
*/
|
|
803
799
|
function interruptors_1(self) {
|
|
804
|
-
return foldLeft_1(tsplus_module_19.empty(), (s, c) => c._tag === "Interrupt" /* CauseTag.Interrupt */ ? tsplus_module_5.just(tsplus_module_19.add(c.id)(s)) : tsplus_module_5.nothing())(self);
|
|
800
|
+
return foldLeft_1(tsplus_module_19.empty(), (s, c) => c._tag === "Interrupt" /* CauseTag.Interrupt */ ? tsplus_module_5.just(tsplus_module_19.add(c.id)(s), fileName_1 + ":731:88") : tsplus_module_5.nothing(fileName_1 + ":731:111"))(self);
|
|
805
801
|
}
|
|
806
802
|
/**
|
|
807
803
|
* Determines if the `Cause` contains only interruptions and not any `Halt` or
|
|
@@ -810,7 +806,7 @@ function interruptors_1(self) {
|
|
|
810
806
|
* @tsplus getter fncts.Cause interruptedOnly
|
|
811
807
|
*/
|
|
812
808
|
function interruptedOnly(self) {
|
|
813
|
-
return tsplus_module_12.getOrElse(() => true)(find_1(c => halted_1(c) || failed_1(c) ? tsplus_module_5.just(false) : tsplus_module_5.nothing())(self));
|
|
809
|
+
return tsplus_module_12.getOrElse(() => true)(find_1(c => halted_1(c) || failed_1(c) ? tsplus_module_5.just(false, fileName_1 + ":741:63") : tsplus_module_5.nothing(fileName_1 + ":741:86"))(self));
|
|
814
810
|
}
|
|
815
811
|
/**
|
|
816
812
|
* Remove all `Fail` and `Interrupt` nodes from this `Cause`,
|
|
@@ -820,30 +816,30 @@ function interruptedOnly(self) {
|
|
|
820
816
|
*/
|
|
821
817
|
function keepDefects(self) {
|
|
822
818
|
return tsplus_module_13.fold({
|
|
823
|
-
Empty: () => tsplus_module_5.nothing(),
|
|
824
|
-
Fail: () => tsplus_module_5.nothing(),
|
|
825
|
-
Halt: (t, trace) => tsplus_module_5.just(halt_1(t, trace)),
|
|
826
|
-
Interrupt: () => tsplus_module_5.nothing(),
|
|
819
|
+
Empty: () => tsplus_module_5.nothing(fileName_1 + ":752:25"),
|
|
820
|
+
Fail: () => tsplus_module_5.nothing(fileName_1 + ":753:24"),
|
|
821
|
+
Halt: (t, trace) => tsplus_module_5.just(halt_1(t, trace), fileName_1 + ":754:29"),
|
|
822
|
+
Interrupt: () => tsplus_module_5.nothing(fileName_1 + ":755:29"),
|
|
827
823
|
Then: (l, r) => {
|
|
828
824
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r)) {
|
|
829
|
-
return tsplus_module_5.just(then_1(l.value, r.value));
|
|
825
|
+
return tsplus_module_5.just(then_1(l.value, r.value), fileName_1 + ":758:20");
|
|
830
826
|
} else if (tsplus_module_11.isJust(l) && tsplus_module_11.isNothing(r)) {
|
|
831
|
-
return tsplus_module_5.just(l.value);
|
|
827
|
+
return tsplus_module_5.just(l.value, fileName_1 + ":760:20");
|
|
832
828
|
} else if (tsplus_module_11.isNothing(l) && tsplus_module_11.isJust(r)) {
|
|
833
|
-
return tsplus_module_5.just(r.value);
|
|
829
|
+
return tsplus_module_5.just(r.value, fileName_1 + ":762:20");
|
|
834
830
|
} else {
|
|
835
|
-
return tsplus_module_5.nothing();
|
|
831
|
+
return tsplus_module_5.nothing(fileName_1 + ":764:23");
|
|
836
832
|
}
|
|
837
833
|
},
|
|
838
834
|
Both: (l, r) => {
|
|
839
835
|
if (tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r)) {
|
|
840
|
-
return tsplus_module_5.just(both_1(l.value, r.value));
|
|
836
|
+
return tsplus_module_5.just(both_1(l.value, r.value), fileName_1 + ":769:20");
|
|
841
837
|
} else if (tsplus_module_11.isJust(l) && tsplus_module_11.isNothing(r)) {
|
|
842
|
-
return tsplus_module_5.just(l.value);
|
|
838
|
+
return tsplus_module_5.just(l.value, fileName_1 + ":771:20");
|
|
843
839
|
} else if (tsplus_module_11.isNothing(l) && tsplus_module_11.isJust(r)) {
|
|
844
|
-
return tsplus_module_5.just(r.value);
|
|
840
|
+
return tsplus_module_5.just(r.value, fileName_1 + ":773:20");
|
|
845
841
|
} else {
|
|
846
|
-
return tsplus_module_5.nothing();
|
|
842
|
+
return tsplus_module_5.nothing(fileName_1 + ":775:23");
|
|
847
843
|
}
|
|
848
844
|
},
|
|
849
845
|
Stackless: (maybeCause, stackless) => tsplus_module_12.map(cause => stackless_1(cause, stackless))(maybeCause)
|
|
@@ -906,12 +902,12 @@ function stripFailures(self) {
|
|
|
906
902
|
function stripSomeDefects(p) {
|
|
907
903
|
return self => {
|
|
908
904
|
return tsplus_module_13.fold({
|
|
909
|
-
Empty: () => tsplus_module_5.just(empty_1()),
|
|
910
|
-
Fail: (e, trace) => tsplus_module_5.just(fail_1(e, trace)),
|
|
911
|
-
Halt: (t, trace) => p(t) ? tsplus_module_5.nothing() : tsplus_module_5.just(halt_1(t, trace)),
|
|
912
|
-
Interrupt: (fiberId, trace) => tsplus_module_5.just(interrupt_1(fiberId, trace)),
|
|
913
|
-
Then: (l, r) => tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r) ? tsplus_module_5.just(then_1(l.value, r.value)) : tsplus_module_11.isJust(l) ? tsplus_module_5.just(l.value) : tsplus_module_11.isJust(r) ? tsplus_module_5.just(r.value) : tsplus_module_5.nothing(),
|
|
914
|
-
Both: (l, r) => tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r) ? tsplus_module_5.just(then_1(l.value, r.value)) : tsplus_module_11.isJust(l) ? tsplus_module_5.just(l.value) : tsplus_module_11.isJust(r) ? tsplus_module_5.just(r.value) : tsplus_module_5.nothing(),
|
|
905
|
+
Empty: () => tsplus_module_5.just(empty_1(), fileName_1 + ":843:24"),
|
|
906
|
+
Fail: (e, trace) => tsplus_module_5.just(fail_1(e, trace), fileName_1 + ":844:31"),
|
|
907
|
+
Halt: (t, trace) => p(t) ? tsplus_module_5.nothing(fileName_1 + ":845:42") : tsplus_module_5.just(halt_1(t, trace), fileName_1 + ":845:51"),
|
|
908
|
+
Interrupt: (fiberId, trace) => tsplus_module_5.just(interrupt_1(fiberId, trace), fileName_1 + ":846:42"),
|
|
909
|
+
Then: (l, r) => tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r) ? tsplus_module_5.just(then_1(l.value, r.value), fileName_1 + ":849:17") : tsplus_module_11.isJust(l) ? tsplus_module_5.just(l.value, fileName_1 + ":851:17") : tsplus_module_11.isJust(r) ? tsplus_module_5.just(r.value, fileName_1 + ":853:17") : tsplus_module_5.nothing(fileName_1 + ":854:20"),
|
|
910
|
+
Both: (l, r) => tsplus_module_11.isJust(l) && tsplus_module_11.isJust(r) ? tsplus_module_5.just(then_1(l.value, r.value), fileName_1 + ":857:17") : tsplus_module_11.isJust(l) ? tsplus_module_5.just(l.value, fileName_1 + ":859:17") : tsplus_module_11.isJust(r) ? tsplus_module_5.just(r.value, fileName_1 + ":861:17") : tsplus_module_5.nothing(fileName_1 + ":862:20"),
|
|
915
911
|
Stackless: (causeOption, stackless) => tsplus_module_12.map(cause => stackless_1(cause, stackless))(causeOption)
|
|
916
912
|
})(self);
|
|
917
913
|
};
|
|
@@ -920,39 +916,39 @@ function sequenceCauseEitherEval(self) {
|
|
|
920
916
|
switch (self._tag) {
|
|
921
917
|
case "Empty" /* CauseTag.Empty */:
|
|
922
918
|
{
|
|
923
|
-
return
|
|
919
|
+
return tsplus_module_3.now(tsplus_module_10.left(empty_1(), fileName_1 + ":871:34"));
|
|
924
920
|
}
|
|
925
921
|
case "Interrupt" /* CauseTag.Interrupt */:
|
|
926
922
|
{
|
|
927
|
-
return
|
|
923
|
+
return tsplus_module_3.now(tsplus_module_10.left(self, fileName_1 + ":874:34"));
|
|
928
924
|
}
|
|
929
925
|
case "Fail" /* CauseTag.Fail */:
|
|
930
926
|
{
|
|
931
|
-
return
|
|
927
|
+
return tsplus_module_3.now(tsplus_module_17.match(e => tsplus_module_10.left(fail_1(e, tsplus_module_8.none), fileName_1 + ":879:29"), a => tsplus_module_10.right(a, fileName_1 + ":880:30"))(self.value));
|
|
932
928
|
}
|
|
933
929
|
case "Halt" /* CauseTag.Halt */:
|
|
934
930
|
{
|
|
935
|
-
return
|
|
931
|
+
return tsplus_module_3.now(tsplus_module_10.left(self, fileName_1 + ":885:34"));
|
|
936
932
|
}
|
|
937
933
|
case "Then" /* CauseTag.Then */:
|
|
938
934
|
{
|
|
939
|
-
return
|
|
935
|
+
return tsplus_module_4.zipWith(tsplus_module_3.defer(() => sequenceCauseEitherEval(self.right)), (lefts, rights) => {
|
|
940
936
|
void 0;
|
|
941
937
|
void 0;
|
|
942
|
-
return lefts._tag === "Left" /* EitherTag.Left */ ? rights._tag === "Right" /* EitherTag.Right */ ? tsplus_module_10.right(rights.right) : tsplus_module_10.left(then_1(lefts.left, rights.left)) : tsplus_module_10.right(lefts.right);
|
|
943
|
-
})(
|
|
938
|
+
return lefts._tag === "Left" /* EitherTag.Left */ ? rights._tag === "Right" /* EitherTag.Right */ ? tsplus_module_10.right(rights.right, fileName_1 + ":895:29") : tsplus_module_10.left(then_1(lefts.left, rights.left), fileName_1 + ":896:28") : tsplus_module_10.right(lefts.right, fileName_1 + ":897:27");
|
|
939
|
+
})(tsplus_module_3.defer(() => sequenceCauseEitherEval(self.left)));
|
|
944
940
|
}
|
|
945
941
|
case "Both" /* CauseTag.Both */:
|
|
946
942
|
{
|
|
947
|
-
return
|
|
943
|
+
return tsplus_module_4.zipWith(tsplus_module_3.defer(() => sequenceCauseEitherEval(self.right)), (lefts, rights) => {
|
|
948
944
|
void 0;
|
|
949
945
|
void 0;
|
|
950
|
-
return lefts._tag === "Left" /* EitherTag.Left */ ? rights._tag === "Right" /* EitherTag.Right */ ? tsplus_module_10.right(rights.right) : tsplus_module_10.left(both_1(lefts.left, rights.left)) : tsplus_module_10.right(lefts.right);
|
|
951
|
-
})(
|
|
946
|
+
return lefts._tag === "Left" /* EitherTag.Left */ ? rights._tag === "Right" /* EitherTag.Right */ ? tsplus_module_10.right(rights.right, fileName_1 + ":909:29") : tsplus_module_10.left(both_1(lefts.left, rights.left), fileName_1 + ":910:28") : tsplus_module_10.right(lefts.right, fileName_1 + ":911:27");
|
|
947
|
+
})(tsplus_module_3.defer(() => sequenceCauseEitherEval(self.left)));
|
|
952
948
|
}
|
|
953
949
|
case "Stackless" /* CauseTag.Stackless */:
|
|
954
950
|
{
|
|
955
|
-
return
|
|
951
|
+
return tsplus_module_4.map(_ => tsplus_module_18.mapLeft(cause => stackless_1(cause, self.stackless))(_))(tsplus_module_3.defer(() => sequenceCauseEitherEval(self.cause)));
|
|
956
952
|
}
|
|
957
953
|
}
|
|
958
954
|
}
|
|
@@ -962,45 +958,45 @@ function sequenceCauseEitherEval(self) {
|
|
|
962
958
|
* @tsplus getter fncts.Cause sequenceCauseEither
|
|
963
959
|
*/
|
|
964
960
|
function sequenceCauseEither(self) {
|
|
965
|
-
return
|
|
961
|
+
return tsplus_module_2.run(sequenceCauseEitherEval(self));
|
|
966
962
|
}
|
|
967
963
|
function sequenceCauseMaybeEval(self) {
|
|
968
964
|
switch (self._tag) {
|
|
969
965
|
case "Empty" /* CauseTag.Empty */:
|
|
970
966
|
{
|
|
971
|
-
return
|
|
967
|
+
return tsplus_module_3.now(tsplus_module_5.just(empty_1(), fileName_1 + ":935:33"));
|
|
972
968
|
}
|
|
973
969
|
case "Interrupt" /* CauseTag.Interrupt */:
|
|
974
970
|
{
|
|
975
|
-
return
|
|
971
|
+
return tsplus_module_3.now(tsplus_module_5.just(self, fileName_1 + ":938:33"));
|
|
976
972
|
}
|
|
977
973
|
case "Fail" /* CauseTag.Fail */:
|
|
978
974
|
{
|
|
979
|
-
return
|
|
975
|
+
return tsplus_module_3.now(tsplus_module_12.map(e => fail_1(e, tsplus_module_8.none))(self.value));
|
|
980
976
|
}
|
|
981
977
|
case "Halt" /* CauseTag.Halt */:
|
|
982
978
|
{
|
|
983
|
-
return
|
|
979
|
+
return tsplus_module_3.now(tsplus_module_5.just(self, fileName_1 + ":944:33"));
|
|
984
980
|
}
|
|
985
981
|
case "Then" /* CauseTag.Then */:
|
|
986
982
|
{
|
|
987
|
-
return
|
|
983
|
+
return tsplus_module_4.zipWith(tsplus_module_3.defer(() => sequenceCauseMaybeEval(self.right)), (lefts, rights) => {
|
|
988
984
|
void 0;
|
|
989
985
|
void 0;
|
|
990
|
-
return lefts._tag === "Just" /* MaybeTag.Just */ ? rights._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_5.just(then_1(lefts.value, rights.value)) : lefts : rights._tag === "Just" /* MaybeTag.Just */ ? rights : tsplus_module_5.nothing();
|
|
991
|
-
})(
|
|
986
|
+
return lefts._tag === "Just" /* MaybeTag.Just */ ? rights._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_5.just(then_1(lefts.value, rights.value), fileName_1 + ":954:27") : lefts : rights._tag === "Just" /* MaybeTag.Just */ ? rights : tsplus_module_5.nothing(fileName_1 + ":958:28");
|
|
987
|
+
})(tsplus_module_3.defer(() => sequenceCauseMaybeEval(self.left)));
|
|
992
988
|
}
|
|
993
989
|
case "Both" /* CauseTag.Both */:
|
|
994
990
|
{
|
|
995
|
-
return
|
|
991
|
+
return tsplus_module_4.zipWith(tsplus_module_3.defer(() => sequenceCauseMaybeEval(self.right)), (lefts, rights) => {
|
|
996
992
|
void 0;
|
|
997
993
|
void 0;
|
|
998
|
-
return lefts._tag === "Just" /* MaybeTag.Just */ ? rights._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_5.just(both_1(lefts.value, rights.value)) : lefts : rights._tag === "Just" /* MaybeTag.Just */ ? rights : tsplus_module_5.nothing();
|
|
999
|
-
})(
|
|
994
|
+
return lefts._tag === "Just" /* MaybeTag.Just */ ? rights._tag === "Just" /* MaybeTag.Just */ ? tsplus_module_5.just(both_1(lefts.value, rights.value), fileName_1 + ":970:27") : lefts : rights._tag === "Just" /* MaybeTag.Just */ ? rights : tsplus_module_5.nothing(fileName_1 + ":974:28");
|
|
995
|
+
})(tsplus_module_3.defer(() => sequenceCauseMaybeEval(self.left)));
|
|
1000
996
|
}
|
|
1001
997
|
case "Stackless" /* CauseTag.Stackless */:
|
|
1002
998
|
{
|
|
1003
|
-
return
|
|
999
|
+
return tsplus_module_4.map(_ => tsplus_module_12.map(cause => stackless_1(cause, self.stackless))(_))(tsplus_module_3.defer(() => sequenceCauseMaybeEval(self.cause)));
|
|
1004
1000
|
}
|
|
1005
1001
|
}
|
|
1006
1002
|
}
|
|
@@ -1010,7 +1006,7 @@ function sequenceCauseMaybeEval(self) {
|
|
|
1010
1006
|
* @tsplus getter fncts.Cause sequenceCauseMaybe
|
|
1011
1007
|
*/
|
|
1012
1008
|
function sequenceCauseMaybe(self) {
|
|
1013
|
-
return
|
|
1009
|
+
return tsplus_module_2.run(sequenceCauseMaybeEval(self));
|
|
1014
1010
|
}
|
|
1015
1011
|
/**
|
|
1016
1012
|
* Squashes a `Cause` down to a single `Error`, chosen to be the
|
|
@@ -1020,7 +1016,7 @@ function sequenceCauseMaybe(self) {
|
|
|
1020
1016
|
*/
|
|
1021
1017
|
function squashWith(f) {
|
|
1022
1018
|
return self => {
|
|
1023
|
-
return tsplus_module_12.getOrElse(() => new tsplus_module_20.InterruptedException())(tsplus_module_12.orElse(() => tsplus_module_7.head(defects_1(self)))(tsplus_module_12.orElse(() => isInterrupted_1(self) ? tsplus_module_5.just(new tsplus_module_20.InterruptedException("Interrupted by fibers: " + tsplus_module_19.join(", ")(tsplus_module_19.map(id => `#${id}`)(tsplus_module_19.flatMap(id => tsplus_module_21.ids(id))(interruptors_1(self)))))) : tsplus_module_5.nothing())(tsplus_module_12.map(f)(failureMaybe_1(self)))));
|
|
1019
|
+
return tsplus_module_12.getOrElse(() => new tsplus_module_20.InterruptedException())(tsplus_module_12.orElse(() => tsplus_module_7.head(defects_1(self)))(tsplus_module_12.orElse(() => isInterrupted_1(self) ? tsplus_module_5.just(new tsplus_module_20.InterruptedException("Interrupted by fibers: " + tsplus_module_19.join(", ")(tsplus_module_19.map(id => `#${id}`)(tsplus_module_19.flatMap(id => tsplus_module_21.ids(id))(interruptors_1(self))))), fileName_1 + ":1007:17") : tsplus_module_5.nothing(fileName_1 + ":1016:20"))(tsplus_module_12.map(f)(failureMaybe_1(self)))));
|
|
1024
1020
|
};
|
|
1025
1021
|
}
|
|
1026
1022
|
/**
|
|
@@ -1032,7 +1028,7 @@ function squashWith(f) {
|
|
|
1032
1028
|
* @tsplus static fncts.Cause.ThenOps __call
|
|
1033
1029
|
*/
|
|
1034
1030
|
function then_1(left, right) {
|
|
1035
|
-
return
|
|
1031
|
+
return tsplus_module_1.isEmpty(left) ? right : tsplus_module_1.isEmpty(right) ? left : new _definition3.Then(left, right);
|
|
1036
1032
|
}
|
|
1037
1033
|
/**
|
|
1038
1034
|
* Constructs a `Cause` from a `Cause` and a stack trace.
|