| 287 | |
| 288 | /** @internal */ |
| 289 | export const keepDefectsAndElectFailures = <E>(self: Cause.Cause<E>): Option.Option<Cause.Cause<never>> => |
| 290 | match(self, { |
| 291 | onEmpty: Option.none(), |
| 292 | onFail: (failure) => Option.some(die(failure)), |
| 293 | onDie: (defect) => Option.some(die(defect)), |
| 294 | onInterrupt: () => Option.none(), |
| 295 | onSequential: Option.mergeWith(sequential), |
| 296 | onParallel: Option.mergeWith(parallel) |
| 297 | }) |
| 298 | |
| 299 | /** @internal */ |
| 300 | export const linearize = <E>(self: Cause.Cause<E>): HashSet.HashSet<Cause.Cause<E>> => |