Source file p11_slot_id.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
type t = Unsigned.ULong.t [@@deriving ord]
let equal a b = compare a b = 0
let show = Unsigned.ULong.to_string
let pp fmt n = Format.pp_print_string fmt (show n)
let of_yojson = function
| `String s -> Ok (Unsigned.ULong.of_string s)
| _ -> Error "ulong_of_yojson: not a string"
let to_yojson ulong = `String (Unsigned.ULong.to_string ulong)
let to_string = Unsigned.ULong.to_string
let hash = Unsigned.ULong.to_int