// Generated by ReScript, PLEASE EDIT WITH CARE


function test(dom) {
  let elem = dom.getElementById("haha");
  if (elem !== null) {
    console.log(elem);
    return 2;
  } else {
    return 1;
  }
}

function f_undefined(xs, i) {
  let k = xs[i];
  if (k !== undefined) {
    return k;
  }
  throw {
    RE_EXN_ID: "Assert_failure",
    _1: [
      "return_check.res",
      23,
      12
    ],
    Error: new Error()
  };
}

function f_escaped_not(xs, i) {
  let x = xs[i];
  console.log("hei");
  if (x !== undefined) {
    return x;
  } else {
    return 1;
  }
}

function f_escaped_1(xs, i) {
  let x = xs[i];
  return () => {
    if (x !== undefined) {
      return x;
    } else {
      return 1;
    }
  };
}

function f_escaped_2(xs, i) {
  console.log(xs[i]);
}

function f_null(xs, i) {
  let k = xs[i];
  if (k !== null) {
    return k;
  }
  throw {
    RE_EXN_ID: "Assert_failure",
    _1: [
      "return_check.res",
      51,
      12
    ],
    Error: new Error()
  };
}

function f_null_undefined(xs, i) {
  let k = xs[i];
  if (!(k == null)) {
    return k;
  }
  throw {
    RE_EXN_ID: "Assert_failure",
    _1: [
      "return_check.res",
      59,
      12
    ],
    Error: new Error()
  };
}

export {
  test,
  f_undefined,
  f_escaped_not,
  f_escaped_1,
  f_escaped_2,
  f_null,
  f_null_undefined,
}
/* No side effect */
