MCPcopy Create free account
hub / github.com/Effect-TS/effect / defects

Function defects

packages/effect/src/internal/cause.ts:213–223  ·  view source on GitHub ↗
(self: Cause.Cause<E>)

Source from the content-addressed store, hash-verified

211
212/** @internal */
213export const defects = <E>(self: Cause.Cause<E>): Chunk.Chunk<unknown> =>
214 Chunk.reverse(
215 reduce<Chunk.Chunk<unknown>, E>(
216 self,
217 Chunk.empty<unknown>(),
218 (list, cause) =>
219 cause._tag === OpCodes.OP_DIE ?
220 Option.some(pipe(list, Chunk.prepend(cause.defect))) :
221 Option.none()
222 )
223 )
224
225/** @internal */
226export const interruptors = <E>(self: Cause.Cause<E>): HashSet.HashSet<FiberId.FiberId> =>

Callers

nothing calls this directly

Calls 2

reduceFunction · 0.70
pipeFunction · 0.70

Tested by

no test coverage detected