(error: Formatter<E>, defect: Formatter<unknown>)
| 10421 | } |
| 10422 | |
| 10423 | function causeReasonToFormatter<E>(error: Formatter<E>, defect: Formatter<unknown>) { |
| 10424 | return (t: Cause_.Reason<E>) => { |
| 10425 | switch (t._tag) { |
| 10426 | case "Fail": |
| 10427 | return `Fail(${error(t.error)})` |
| 10428 | case "Die": |
| 10429 | return `Die(${defect(t.defect)})` |
| 10430 | case "Interrupt": |
| 10431 | return "Interrupt" |
| 10432 | } |
| 10433 | } |
| 10434 | } |
| 10435 | |
| 10436 | /** |
| 10437 | * Type-level representation returned by {@link Cause}. |
no test coverage detected