import * as tracing_1 from "../Tracing";
const fileName_1 = "(@effect-ts/system): _src/Effect/unsome.ts";
import * as O from "../Option";
import { succeed } from "./core";
import { fail } from "./fail";
import * as FM from "./foldM";
/**
 * Converts an option on errors into an option on values.
 */

export function unsome(self) {
  return FM.foldM_(self, O.fold(() => succeed(O.emptyOf(), fileName_1 + ":15:25"), tracing_1.traceCallLast(fail, fileName_1 + ":15:47")), a => succeed(O.some(a), fileName_1 + ":16:19"), fileName_1 + ":13:19");
}
//# sourceMappingURL=unsome.js.map