var _a, _b, _c, _d;

import { STMBase } from "@effect/core/stm/STM/definition/base";
export class STMEffect extends STMBase {
  constructor(f) {
    super();
    this.f = f;
    this._tag = "STMEffect";
  }

}
export class STMOnFailure extends STMBase {
  constructor(stm, onFailure) {
    super();
    this.stm = stm;
    this.onFailure = onFailure;
    this._tag = "STMOnFailure";
  }

  apply(a) {
    return new STMSucceedNow(a);
  }

}
export class STMOnRetry extends STMBase {
  constructor(stm, onRetry) {
    super();
    this.stm = stm;
    this.onRetry = onRetry;
    this._tag = "STMOnRetry";
  }

  apply(a) {
    return new STMSucceedNow(a);
  }

}
export class STMOnSuccess extends STMBase {
  constructor(stm, apply) {
    super();
    this.stm = stm;
    this.apply = apply;
    this._tag = "STMOnSuccess";
  }

}
export class STMProvide extends STMBase {
  constructor(stm, f) {
    super();
    this.stm = stm;
    this.f = f;
    this._tag = "STMProvide";
  }

}
export class STMSucceedNow extends STMBase {
  constructor(a) {
    super();
    this.a = a;
    this._tag = "STMSucceedNow";
  }

}
export class STMSucceed extends STMBase {
  constructor(a) {
    super();
    this.a = a;
    this._tag = "STMSucceed";
  }

}
/**
 * @tsplus macro remove
 */

export function concreteSTM(_) {//
}
export const STMFailExceptionSym = /*#__PURE__*/Symbol.for("@effect/core/stm/STM/FailException");
export class STMFailException {
  constructor(e) {
    this.e = e;
    this[_a] = STMFailExceptionSym;
  }

}
_a = STMFailExceptionSym;
/**
 * @tsplus static ets/STM/Ops isFailException
 */

export function isFailException(u) {
  return typeof u === "object" && u != null && STMFailExceptionSym in u;
}
export const STMDieExceptionSym = /*#__PURE__*/Symbol.for("@effect/core/stm/STM/DieException");
export class STMDieException {
  constructor(e) {
    this.e = e;
    this[_b] = STMDieExceptionSym;
  }

}
_b = STMDieExceptionSym;
/**
 * @tsplus static ets/STM/Ops isDieException
 */

export function isDieException(u) {
  return typeof u === "object" && u != null && STMDieExceptionSym in u;
}
export const STMInterruptExceptionSym = /*#__PURE__*/Symbol.for("@effect/core/stm/STM/InterruptException");
export class STMInterruptException {
  constructor(fiberId) {
    this.fiberId = fiberId;
    this[_c] = STMInterruptExceptionSym;
  }

}
_c = STMInterruptExceptionSym;
/**
 * @tsplus static ets/STM/Ops isInterruptException
 */

export function isInterruptException(u) {
  return typeof u === "object" && u != null && STMInterruptExceptionSym in u;
}
export const STMRetryExceptionSym = /*#__PURE__*/Symbol.for("@effect/core/stm/STM/RetryException");
export class STMRetryException {
  constructor() {
    this[_d] = STMRetryExceptionSym;
  }

}
_d = STMRetryExceptionSym;
/**
 * @tsplus static ets/STM/Ops isRetryException
 */

export function isRetryException(u) {
  return typeof u === "object" && u != null && STMRetryExceptionSym in u;
}
//# sourceMappingURL=primitives.mjs.map