CauseModule

PackageAxial

Summary

NameSignatureSynopsis
mapCause.map mapper causeTransforms the error value of a failure cause using the provided function.
thenCauseCause.thenCause left rightCombines causes that happened sequentially.
bothCause.both left rightCombines causes that happened concurrently.
tracedCause.traced trace causeAttaches diagnostic trace text to a cause.
failuresCause.failures causeReturns every typed failure value contained in a cause tree.
defectsCause.defects causeReturns every defect exception contained in a cause tree.
isInterruptedCause.isInterrupted causeReturns whether the cause tree contains an interruption signal.
prettyPrintCause.prettyPrint formatError causePretty prints a cause tree for diagnostics.

map

Cause.map mapper cause
Member
Transforms the error value of a failure cause using the provided function.

Parameters

NameTypeDescription
mapper'e -> 'fThe function to transform the error value.
causeCause<'e>The original cause to transform.

Returns

Cause<'f>

thenCause

Cause.thenCause left right
Member
Combines causes that happened sequentially.

Parameters

NameTypeDescription
leftCause<'error>
rightCause<'error>

Returns

Cause<'error>

both

Cause.both left right
Member
Combines causes that happened concurrently.

Parameters

NameTypeDescription
leftCause<'error>
rightCause<'error>

Returns

Cause<'error>

traced

Cause.traced trace cause
Member
Attaches diagnostic trace text to a cause.

Parameters

NameTypeDescription
tracestring
causeCause<'error>

Returns

Cause<'error>

failures

Cause.failures cause
Member
Returns every typed failure value contained in a cause tree.

Parameters

NameTypeDescription
causeCause<'error>

Returns

'error list

defects

Cause.defects cause
Member
Returns every defect exception contained in a cause tree.

Parameters

NameTypeDescription
causeCause<'error>

Returns

exn list

isInterrupted

Cause.isInterrupted cause
Member
Returns whether the cause tree contains an interruption signal.

Parameters

NameTypeDescription
causeCause<'error>

Returns

bool

prettyPrint

Cause.prettyPrint formatError cause
Member
Pretty prints a cause tree for diagnostics.

Parameters

NameTypeDescription
formatError'error -> string
causeCause<'error>

Returns

string