// Generated by ReScript, PLEASE EDIT WITH CARE
'use strict';

var Pervasives = require("bs-platform/lib/js/pervasives.js");
var Caml_format = require("bs-platform/lib/js/caml_format.js");
var Maybe$OptolithClient = require("./Maybe.bs.js");

function max(x, y) {
  if (x > y) {
    return x;
  } else {
    return y;
  }
}

function min(x, y) {
  if (x < y) {
    return x;
  } else {
    return y;
  }
}

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

function dec(x) {
  return x - 1 | 0;
}

function negate(x) {
  return -x | 0;
}

function abs(x) {
  if (x < 0) {
    return -x | 0;
  } else {
    return x;
  }
}

function show(prim) {
  return prim.toString();
}

var read = Caml_format.caml_int_of_string;

function readMaybe(x) {
  return Maybe$OptolithClient.optionToMaybe(Pervasives.int_of_string_opt(x));
}

exports.max = max;
exports.min = min;
exports.inc = inc;
exports.dec = dec;
exports.negate = negate;
exports.abs = abs;
exports.show = show;
exports.read = read;
exports.readMaybe = readMaybe;
/* No side effect */
