vendor/re/src/pmark.ml
raw| 1 | module Pmark = struct |
| 2 | type t = int |
| 3 | |
| 4 | let equal (x : int) (y : int) = x = y |
| 5 | let compare (x : int) (y : int) = compare x y |
| 6 | let r = ref 0 |
| 7 | |
| 8 | let gen () = |
| 9 | incr r; |
| 10 | !r |
| 11 | ;; |
| 12 | |
| 13 | let pp = Format.pp_print_int |
| 14 | end |
| 15 | |
| 16 | include Pmark |
| 17 | |
| 18 | module Set = struct |
| 19 | module Set = Set.Make (Pmark) |
| 20 | |
| 21 | let[@warning "-32"] to_list x = |
| 22 | let open Set in |
| 23 | to_seq x |> List.of_seq |
| 24 | ;; |
| 25 | |
| 26 | include Set |
| 27 | end |