File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1
1
type 'v map_as_object =
2
2
(string * 'v) list <json repr="object">
3
3
wrap <ocaml module="Common.StringMap" t="'v Common.StringMap.t">
4
+
5
+ type 'v table_as_object =
6
+ (string * 'v) list <json repr="object">
7
+ wrap <ocaml module="Common.Stringtbl" t="'v Common.Stringtbl.t">
Original file line number Diff line number Diff line change 1
1
open Base
2
- open Devkit
3
2
4
3
module StringMap = struct
5
4
type 'a t = 'a Map .M (String ).t
@@ -15,6 +14,22 @@ module StringMap = struct
15
14
let unwrap = to_list
16
15
end
17
16
17
+ module Stringtbl = struct
18
+ include Hashtbl
19
+
20
+ type 'a t = 'a Hashtbl .M (String ).t
21
+
22
+ let empty () = Hashtbl. create (module String )
23
+
24
+ let to_list (l : 'a t ) : (string * 'a) list = Hashtbl. to_alist l
25
+
26
+ let of_list (m : (string * 'a) list ) : 'a t = Hashtbl. of_alist_exn (module String ) m
27
+
28
+ let wrap = of_list
29
+
30
+ let unwrap = to_list
31
+ end
32
+
18
33
module Re2 = struct
19
34
include Re2
20
35
@@ -23,6 +38,8 @@ module Re2 = struct
23
38
let unwrap = Re2. to_string
24
39
end
25
40
41
+ open Devkit
42
+
26
43
let fmt_error fmt = Printf. ksprintf (fun s -> Error s) fmt
27
44
28
45
let first_line s =
Original file line number Diff line number Diff line change 1
1
(library
2
2
(name lib)
3
3
(libraries atdgen atdgen-runtime base base64 base.caml biniou cstruct curl curl.lwt
4
- devkit devkit.core extlib hex lwt lwt.unix nocrypto omd re2 stdio uri
4
+ devkit devkit.core extlib hex lwt lwt.unix nocrypto omd re2 sexplib0 stdio uri
5
5
yojson)
6
6
(preprocess
7
7
(pps lwt_ppx)))
You can’t perform that action at this time.
0 commit comments