"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.IYield = exports.ITrace = exports.ISuspendWith = exports.ISuspend = exports.ISupervise = exports.ISucceedWith = exports.ISucceedNow = exports.ISucceed = exports.ISetRuntimeConfig = exports.IRaceWith = exports.IOverrideForkScope = exports.ILogged = exports.IInterruptStatus = exports.IGetForkScope = exports.IFork = exports.IFold = exports.IFlatMap = exports.IFiberRefWith = exports.IFiberRefModifyAll = exports.IFiberRefModify = exports.IFiberRefLocally = exports.IFiberRefDelete = exports.IFail = exports.IEnsuring = exports.IDescriptor = exports.ICheckInterrupt = exports.IAsync = void 0;
exports.instruction = instruction;

var tsplus_module_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@tsplus/stdlib/data/Maybe/definition"));

var _base = /*#__PURE__*/require("@effect/core/io/Effect/definition/base");

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

class IFlatMap extends _base.Base {
  constructor(effect, k, trace) {
    super();
    this.effect = effect;
    this.k = k;
    this.trace = trace;
    this._tag = "FlatMap";
  }

  apply(a) {
    return this.k(a);
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFlatMap = IFlatMap;

class ISucceedNow extends _base.Base {
  constructor(value, trace) {
    super();
    this.value = value;
    this.trace = trace;
    this._tag = "SucceedNow";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ISucceedNow = ISucceedNow;

class ISucceed extends _base.Base {
  constructor(effect, trace) {
    super();
    this.effect = effect;
    this.trace = trace;
    this._tag = "Succeed";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ISucceed = ISucceed;

class ISucceedWith extends _base.Base {
  constructor(effect, trace) {
    super();
    this.effect = effect;
    this.trace = trace;
    this._tag = "SucceedWith";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ISucceedWith = ISucceedWith;

class ISuspend extends _base.Base {
  constructor(make, trace) {
    super();
    this.make = make;
    this.trace = trace;
    this._tag = "Suspend";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ISuspend = ISuspend;

class ISuspendWith extends _base.Base {
  constructor(make, trace) {
    super();
    this.make = make;
    this.trace = trace;
    this._tag = "SuspendWith";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ISuspendWith = ISuspendWith;

class IAsync extends _base.Base {
  constructor(register, blockingOn, trace) {
    super();
    this.register = register;
    this.blockingOn = blockingOn;
    this.trace = trace;
    this._tag = "Async";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IAsync = IAsync;

class IFold extends _base.Base {
  constructor(effect, failure, success, trace) {
    super();
    this.effect = effect;
    this.failure = failure;
    this.success = success;
    this.trace = trace;
    this._tag = "Fold";
  }

  apply(a) {
    return this.success(a);
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFold = IFold;

class IFork extends _base.Base {
  constructor(effect, scope, trace) {
    super();
    this.effect = effect;
    this.scope = scope;
    this.trace = trace;
    this._tag = "Fork";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFork = IFork;

class IInterruptStatus extends _base.Base {
  constructor(effect, flag, trace) {
    super();
    this.effect = effect;
    this.flag = flag;
    this.trace = trace;
    this._tag = "InterruptStatus";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IInterruptStatus = IInterruptStatus;

class ICheckInterrupt extends _base.Base {
  constructor(k, trace) {
    super();
    this.k = k;
    this.trace = trace;
    this._tag = "CheckInterrupt";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ICheckInterrupt = ICheckInterrupt;

class IFail extends _base.Base {
  constructor(cause, trace) {
    super();
    this.cause = cause;
    this.trace = trace;
    this._tag = "Fail";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFail = IFail;

class IDescriptor extends _base.Base {
  constructor(f, trace) {
    super();
    this.f = f;
    this.trace = trace;
    this._tag = "Descriptor";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IDescriptor = IDescriptor;

class IYield extends _base.Base {
  constructor(trace) {
    super();
    this.trace = trace;
    this._tag = "Yield";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IYield = IYield;

class IFiberRefModifyAll extends _base.Base {
  constructor(f, trace) {
    super();
    this.f = f;
    this.trace = trace;
    this._tag = "FiberRefModifyAll";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFiberRefModifyAll = IFiberRefModifyAll;

class IFiberRefModify extends _base.Base {
  constructor(fiberRef, f, trace) {
    super();
    this.fiberRef = fiberRef;
    this.f = f;
    this.trace = trace;
    this._tag = "FiberRefModify";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFiberRefModify = IFiberRefModify;

class IFiberRefLocally extends _base.Base {
  constructor(localValue, fiberRef, effect, trace) {
    super();
    this.localValue = localValue;
    this.fiberRef = fiberRef;
    this.effect = effect;
    this.trace = trace;
    this._tag = "FiberRefLocally";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFiberRefLocally = IFiberRefLocally;

class IFiberRefDelete extends _base.Base {
  constructor(fiberRef, trace) {
    super();
    this.fiberRef = fiberRef;
    this.trace = trace;
    this._tag = "FiberRefDelete";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFiberRefDelete = IFiberRefDelete;

class IFiberRefWith extends _base.Base {
  constructor(fiberRef, f, trace) {
    super();
    this.fiberRef = fiberRef;
    this.f = f;
    this.trace = trace;
    this._tag = "FiberRefWith";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IFiberRefWith = IFiberRefWith;

class ITrace extends _base.Base {
  constructor(trace) {
    super();
    this.trace = trace;
    this._tag = "Trace";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ITrace = ITrace;

class IRaceWith extends _base.Base {
  constructor(left, right, leftWins, rightWins, trace) {
    super();
    this.left = left;
    this.right = right;
    this.leftWins = leftWins;
    this.rightWins = rightWins;
    this.trace = trace;
    this._tag = "RaceWith";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IRaceWith = IRaceWith;

class ISupervise extends _base.Base {
  constructor(effect, supervisor, trace) {
    super();
    this.effect = effect;
    this.supervisor = supervisor;
    this.trace = trace;
    this._tag = "Supervise";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ISupervise = ISupervise;

class IGetForkScope extends _base.Base {
  constructor(f, trace) {
    super();
    this.f = f;
    this.trace = trace;
    this._tag = "GetForkScope";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IGetForkScope = IGetForkScope;

class IOverrideForkScope extends _base.Base {
  constructor(effect, forkScope, trace) {
    super();
    this.effect = effect;
    this.forkScope = forkScope;
    this.trace = trace;
    this._tag = "OverrideForkScope";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IOverrideForkScope = IOverrideForkScope;

class IEnsuring extends _base.Base {
  constructor(effect, finalizer, trace) {
    super();
    this.effect = effect;
    this.finalizer = finalizer;
    this.trace = trace;
    this._tag = "Ensuring";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.IEnsuring = IEnsuring;

class ILogged extends _base.Base {
  constructor(message, cause, overrideLogLevel = tsplus_module_1.none, overrideRef1 = null, overrideValue1 = null, trace) {
    super();
    this.message = message;
    this.cause = cause;
    this.overrideLogLevel = overrideLogLevel;
    this.overrideRef1 = overrideRef1;
    this.overrideValue1 = overrideValue1;
    this.trace = trace;
    this._tag = "Logged";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}

exports.ILogged = ILogged;

class ISetRuntimeConfig extends _base.Base {
  constructor(runtimeConfig, trace) {
    super();
    this.runtimeConfig = runtimeConfig;
    this.trace = trace;
    this._tag = "SetRuntimeConfig";
  }

  unsafeLog() {
    return `${this._tag} at ${this.trace}`;
  }

}
/**
 * @tsplus macro identity
 */


exports.ISetRuntimeConfig = ISetRuntimeConfig;

function instruction(self) {
  // @ts-expect-error
  return self;
}
//# sourceMappingURL=primitives.js.map