package bin_prot

  1. Overview
  2. Docs

Source file nat0.ml

1
2
3
4
5
6
7
8
9
(* Nat0: natural numbers (including zero) *)

type t = int

let of_int n =
  if n < 0 then failwith "Bin_prot.Nat0.of_int: n < 0";
  n

external unsafe_of_int : int -> t = "%identity"