const fileName_1 = "(@effect/core) _src/io/Effect/operations/retryUntilEquals.ts";
import * as tsplus_module_1 from "@effect/core/io/Effect/operations/retryUntil";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/succeed";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/flatMap";
/**
 * Retries this effect until its error is equal to the specified error.
 *
 * @tsplus fluent ets/Effect retryUntilEquals
 */

export function retryUntilEquals_(self, E) {
  return (e, __tsplusTrace) => tsplus_module_3.flatMap_(tsplus_module_2.succeed(e, fileName_1 + ":8:19"), _ => tsplus_module_1.retryUntil_(self, e => E.equals(_, e), fileName_1 + ":8:53"), fileName_1 + ":8:30");
}
/**
 * Retries this effect until its error is equal to the specified error.
 *
 * @tsplus static ets/Effect/Aspects retryUntilEquals
 */

export const retryUntilEquals = E => self => retryUntilEquals_(self, E);
//# sourceMappingURL=retryUntilEquals.mjs.map