import { empty } from "../Cause/cause";
import { foldCauseM_, succeed } from "./core";
/**
 * Returns an effect that succeeds with the cause of failure of this effect,
 * or `Cause.empty` if the effect did not succeed.
 */

export function cause(effect, __trace) {
  return foldCauseM_(effect, succeed, () => succeed(empty), __trace);
}
//# sourceMappingURL=cause.js.map