import * as tsplus_module_1 from "@effect/core/io/Exit/operations/failCause";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/succeedNow";
import * as tsplus_module_3 from "@effect/core/io/Exit/operations/succeed";
import { IFold } from "@effect/core/io/Effect/definition/primitives";
/**
 * Returns an effect that semantically runs the effect on a fiber, producing
 * an `Exit` for the completion value of the fiber.
 *
 * @tsplus fluent ets/Effect exit
 */

export function exit(self, __tsplusTrace) {
  return new IFold(self, cause => tsplus_module_2.succeedNow(tsplus_module_1.failCause(cause), __tsplusTrace), success => tsplus_module_2.succeedNow(tsplus_module_3.succeed(success), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=exit.mjs.map