"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.tracedMask = exports.untracedMask = void 0
// tracing: off
const core_1 = require("./core")
function restore(b) {
  return (self) => (b ? (0, core_1.traced)(self) : (0, core_1.untraced)(self))
}
/**
 * Makes the effect untraced, but passes it a restore function that can be used to restore
 * the inherited traceability from whatever region the effect is composed into.
 */
function untracedMask(f) {
  return (0, core_1.checkTraced)((b) => (0, core_1.untraced)(f(restore(b))))
}
exports.untracedMask = untracedMask
/**
 * Makes the effect traced, but passes it a restore function that can be used to restore
 * the inherited traceability from whatever region the effect is composed into.
 */
function tracedMask(f) {
  return (0, core_1.checkTraced)((b) => (0, core_1.traced)(f(restore(b))))
}
exports.tracedMask = tracedMask
//# sourceMappingURL=traceMask.js.map
