import * as tsplus_module_1 from "@effect/core/io/Effect/operations/fail";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/succeedNow";
import * as tsplus_module_3 from "@tsplus/stdlib/data/Maybe/fold";
import * as tsplus_module_4 from "@effect/core/io/Effect/operations/suspendSucceed";
/**
 * Lifts an `Maybe` into an `Effect`. If the option is not defined, fail with
 * the specified `e` value.
 *
 * @tsplus static ets/Effect/Ops getOrFailWith
 */

export function getOrFailWith(option, e, __tsplusTrace) {
  return tsplus_module_4.suspendSucceed(() => tsplus_module_3.fold_(option(), () => tsplus_module_1.fail(e, __tsplusTrace), tsplus_module_2.succeedNow), __tsplusTrace);
}
//# sourceMappingURL=getOrFailWith.mjs.map