"use strict"
var __createBinding =
  (this && this.__createBinding) ||
  (Object.create
    ? function (o, m, k, k2) {
        if (k2 === undefined) k2 = k
        Object.defineProperty(o, k2, {
          enumerable: true,
          get: function () {
            return m[k]
          }
        })
      }
    : function (o, m, k, k2) {
        if (k2 === undefined) k2 = k
        o[k2] = m[k]
      })
var __setModuleDefault =
  (this && this.__setModuleDefault) ||
  (Object.create
    ? function (o, v) {
        Object.defineProperty(o, "default", { enumerable: true, value: v })
      }
    : function (o, v) {
        o["default"] = v
      })
var __importStar =
  (this && this.__importStar) ||
  function (mod) {
    if (mod && mod.__esModule) return mod
    var result = {}
    if (mod != null)
      for (var k in mod)
        if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
          __createBinding(result, mod, k)
    __setModuleDefault(result, mod)
    return result
  }
Object.defineProperty(exports, "__esModule", { value: true })
exports.success =
  exports.fromEffect =
  exports.failure =
  exports.map_ =
  exports.isSuccess =
  exports.chain =
  exports.chain_ =
  exports.as =
  exports.as_ =
  exports.not =
  exports.iff =
  exports.iff_ =
  exports.implies =
  exports.implies_ =
  exports.or =
  exports.or_ =
  exports.and =
  exports.and_ =
  exports.BoolAlgebraM =
    void 0
const tracing_1 = __importStar(require("../../Tracing"))
const fileName_1 = "(@effect-ts/system): _src/Testing/BoolAlgebraM/index.ts"
const T = __importStar(require("../../Effect"))
const Function_1 = require("../../Function")
const BA = __importStar(require("../BoolAlgebra"))
class BoolAlgebraM {
  constructor(run) {
    this.run = run
  }
}
exports.BoolAlgebraM = BoolAlgebraM
T._R, T._E, T._A
function and_(self, that) {
  return new BoolAlgebraM(
    T.zipWith_(self.run, that.run, BA.and_, fileName_1 + ":17:37")
  )
}
exports.and_ = and_
function and(that) {
  return (self) => and_(self, that)
}
exports.and = and
function or_(self, that) {
  return new BoolAlgebraM(T.zipWith_(self.run, that.run, BA.or_, fileName_1 + ":28:37"))
}
exports.or_ = or_
function or(that) {
  return (self) => or_(self, that)
}
exports.or = or
function implies_(self, that) {
  return new BoolAlgebraM(
    T.zipWith_(self.run, that.run, BA.implies_, fileName_1 + ":39:37")
  )
}
exports.implies_ = implies_
function implies(that) {
  return (self) => implies_(self, that)
}
exports.implies = implies
function iff_(self, that) {
  return new BoolAlgebraM(
    T.zipWith_(self.run, that.run, BA.iff_, fileName_1 + ":50:37")
  )
}
exports.iff_ = iff_
function iff(that) {
  return (self) => iff_(self, that)
}
exports.iff = iff
function not(self) {
  return new BoolAlgebraM(T.map_(self.run, BA.not, fileName_1 + ":58:33"))
}
exports.not = not
function as_(self, b) {
  return map_(self, (_) => b)
}
exports.as_ = as_
function as(b) {
  return (self) => as_(self, b)
}
exports.as = as
function chain_(self, f) {
  return new BoolAlgebraM(
    T.chain_(
      self.run,
      BA.chainM((_) => f(_).run),
      fileName_1 + ":77:13"
    )
  )
}
exports.chain_ = chain_
function chain(f) {
  return (self) => chain_(self, f)
}
exports.chain = chain
function isSuccess(self) {
  return T.map_(self.run, BA.isSuccess, fileName_1 + ":91:16")
}
exports.isSuccess = isSuccess
function map_(self, f) {
  return chain_(self, (0, Function_1.flow)(f, success))
}
exports.map_ = map_
function failure(a) {
  return new BoolAlgebraM(T.succeed(BA.failure(a), fileName_1 + ":102:36"))
}
exports.failure = failure
function fromEffect(effect) {
  return new BoolAlgebraM(T.map_(effect, BA.success, fileName_1 + ":106:33"))
}
exports.fromEffect = fromEffect
function success(a) {
  return new BoolAlgebraM(T.succeed(BA.success(a), fileName_1 + ":110:36"))
}
exports.success = success
//# sourceMappingURL=index.js.map
