// Generated by ReScript, PLEASE EDIT WITH CARE

import * as Belt_Id from "@rescript/runtime/lib/es6/Belt_Id.mjs";
import * as Primitive_module from "@rescript/runtime/lib/es6/Primitive_module.mjs";
import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.mjs";

let A = Primitive_module.init([
  "rec_module_opt.res",
  15,
  4
], {
  TAG: "Module",
  _0: [[
      "Function",
      "cmp"
    ]]
});

let AComparable = Belt_Id.MakeComparable(A);

function cmp(t1, t2) {
  if (t1.TAG === "Leaf") {
    if (t2.TAG === "Leaf") {
      return Primitive_string.compare(t1._0, t2._0);
    } else {
      return 1;
    }
  } else if (t2.TAG === "Leaf") {
    return -1;
  } else {
    return AComparable.cmp(t1._0, t2._0);
  }
}

Primitive_module.update({
  TAG: "Module",
  _0: [[
      "Function",
      "cmp"
    ]]
}, A, {
  cmp: cmp
});

let X0 = {};

let Y0 = {};

let X1 = Primitive_module.init([
  "rec_module_opt.res",
  44,
  19
], {
  TAG: "Module",
  _0: [[
      "Function",
      "f"
    ]]
});

let Y1 = Primitive_module.init([
  "rec_module_opt.res",
  47,
  12
], {
  TAG: "Module",
  _0: [[
      "Function",
      "f"
    ]]
});

function f(x) {
  return x + 1 | 0;
}

Primitive_module.update({
  TAG: "Module",
  _0: [[
      "Function",
      "f"
    ]]
}, X1, {
  f: f
});

function f$1(x) {
  return x + 2 | 0;
}

Primitive_module.update({
  TAG: "Module",
  _0: [[
      "Function",
      "f"
    ]]
}, Y1, {
  f: f$1
});

let X;

export {
  A,
  AComparable,
  X,
  X0,
  Y0,
  X1,
  Y1,
}
/* A Not a pure module */
