import * as tsplus_module_1 from "@effect/core/io/Effect/operations/fromEither";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/suspendSucceed";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/flatMap";
export const absolve = absolve_1;
/**
 * Submerges the error case of an `Either` into the `Effect`. The inverse
 * operation of `either`.
 *
 * @tsplus fluent ets/Effect absolve
 */

export function absolveNow(self, __tsplusTrace) {
  return absolve_1(() => self, __tsplusTrace);
}
/**
 * Submerges the error case of an `Either` into the `Effect`. The inverse
 * operation of `either`.
 *
 * @tsplus static ets/Effect/Ops absolve
 */

function absolve_1(self, __tsplusTrace) {
  return tsplus_module_3.flatMap_(tsplus_module_2.suspendSucceed(self, __tsplusTrace), either => tsplus_module_1.fromEither(() => either, __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=absolve.mjs.map