import {
  flap
} from "./chunk-WKK6AYQI.mjs";
import {
  identity,
  pipe,
  unsafeCoerce
} from "./chunk-ZI34HWXZ.mjs";
import {
  __export
} from "./chunk-QK4PKNB3.mjs";

// src/Const.ts
var Const_exports = {};
__export(Const_exports, {
  Bifunctor: () => Bifunctor,
  Contravariant: () => Contravariant,
  Functor: () => Functor,
  URI: () => URI,
  bimap: () => bimap,
  const_: () => const_,
  contramap: () => contramap,
  flap: () => flap2,
  getApplicative: () => getApplicative,
  getApply: () => getApply,
  getBooleanAlgebra: () => getBooleanAlgebra,
  getBounded: () => getBounded,
  getEq: () => getEq,
  getHeytingAlgebra: () => getHeytingAlgebra,
  getMonoid: () => getMonoid,
  getOrd: () => getOrd,
  getRing: () => getRing,
  getSemigroup: () => getSemigroup,
  getSemiring: () => getSemiring,
  getShow: () => getShow,
  make: () => make,
  map: () => map,
  mapLeft: () => mapLeft
});
var make = unsafeCoerce;
function getShow(S) {
  return {
    show: (c) => `make(${S.show(c)})`
  };
}
var getEq = identity;
var getOrd = identity;
var getBounded = identity;
var getSemigroup = identity;
var getMonoid = identity;
var getSemiring = identity;
var getRing = identity;
var getHeytingAlgebra = identity;
var getBooleanAlgebra = identity;
function getApply(S) {
  return {
    URI,
    _E: void 0,
    map: _map,
    ap: (fab, fa) => make(S.concat(fab, fa))
  };
}
function getApplicative(M) {
  const A = getApply(M);
  return {
    URI,
    _E: void 0,
    map: A.map,
    ap: A.ap,
    of: () => make(M.empty)
  };
}
var _contramap = (fa, f) => pipe(fa, contramap(f));
var _map = (fa, f) => pipe(fa, map(f));
var _bimap = (fa, f, g) => pipe(fa, bimap(f, g));
var _mapLeft = (fa, f) => pipe(fa, mapLeft(f));
var contramap = () => unsafeCoerce;
var map = () => unsafeCoerce;
var bimap = (f) => (fa) => make(f(fa));
var mapLeft = (f) => (fa) => make(f(fa));
var URI = "Const";
var Functor = {
  URI,
  map: _map
};
var flap2 = /* @__PURE__ */ flap(Functor);
var Contravariant = {
  URI,
  contramap: _contramap
};
var Bifunctor = {
  URI,
  bimap: _bimap,
  mapLeft: _mapLeft
};
var const_ = {
  URI,
  map: _map,
  contramap: _contramap,
  bimap: _bimap,
  mapLeft: _mapLeft
};

export {
  make,
  getShow,
  getEq,
  getOrd,
  getBounded,
  getSemigroup,
  getMonoid,
  getSemiring,
  getRing,
  getHeytingAlgebra,
  getBooleanAlgebra,
  getApply,
  getApplicative,
  contramap,
  map,
  bimap,
  mapLeft,
  URI,
  Functor,
  flap2 as flap,
  Contravariant,
  Bifunctor,
  const_,
  Const_exports
};
