const fileName_1 = "(@effect/core) _src/stream/Take/operations/fromEffect.ts";
import * as tsplus_module_1 from "@effect/core/stream/Take/operations/failCause";
import * as tsplus_module_2 from "@effect/core/stream/Take/operations/single";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/foldCause";
/**
 * Creates an effect from `Effect<R, E, A>` that does not fail, but succeeds
 * with the `Take<E, A>`. Any error returned from the stream when pulling is
 * converted to `Take.halt`. Creates a singleton chunk.
 *
 * @tsplus static ets/Take/Ops fromEffect
 */

export function fromEffect(effect) {
  return tsplus_module_3.foldCause_(effect, cause => tsplus_module_1.failCause(cause), tsplus_module_2.single, fileName_1 + ":9:26");
}
//# sourceMappingURL=fromEffect.mjs.map