import * as tsplus_module_1 from "@tsplus/stdlib/structure/Hash";
import * as tsplus_module_2 from "@tsplus/stdlib/structure/Equals";
export const Exit = {
  $: {}
};
/**
 * @tsplus type ets/Exit/Success
 */

export class Success {
  constructor(value) {
    this.value = value;
    this._tag = "Success";
  }

  [tsplus_module_1.Hash.sym]() {
    return tsplus_module_1.hashUnknown(this.value);
  }

  [tsplus_module_2.Equals.sym](that) {
    return that instanceof Success && tsplus_module_2.equals(this.value, that.value);
  }

}
/**
 * @tsplus type ets/Exit/Failure
 */

export class Failure {
  constructor(cause) {
    this.cause = cause;
    this._tag = "Failure";
  }

  [tsplus_module_1.Hash.sym]() {
    return tsplus_module_1.hashUnknown(this.cause);
  }

  [tsplus_module_2.Equals.sym](that) {
    return that instanceof Failure && tsplus_module_2.equals(this.cause, that.cause);
  }

}
/**
 * @tsplus unify ets/Exit
 * @tsplus unify ets/Exit/Success
 * @tsplus unify ets/Exit/Failure
 */

export function unifyExit(self) {
  return self;
}
//# sourceMappingURL=definition.mjs.map