let of_int i =
  try Some (of_int_exn i)
  with Bad _ -> None