UNPKG

@effect-ts/system

Version:

Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.

21 lines (17 loc) 595 B
// ets_tracing: off import type { Cause } from "../../Cause/index.js" import type { Trace } from "../../Fiber/tracing.js" import * as T from "../deps.js" import { fromEffect } from "../fromEffect.js" /** * Returns an effect that models failure with the specified `Cause`. */ export function halt<E>(self: Cause<E>, __trace?: string) { return fromEffect(T.halt(self), __trace) } /** * Returns an effect that models failure with the specified `Cause`. */ export function haltWith<E>(self: (_: () => Trace) => Cause<E>, __trace?: string) { return fromEffect(T.haltWith(self, __trace)) }