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