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
@@ -11,13 +10,31 @@ module StringMap = struct
11
10
let unwrap = to_list
12
11
end
13
12
13
+ module Stringtbl = struct
14
+ include Hashtbl
15
+
16
+ type 'a t = 'a Hashtbl .M (String ).t
17
+
18
+ let empty () = Hashtbl. create (module String )
19
+
20
+ let to_list (l : 'a t ) : (string * 'a) list = Hashtbl. to_alist l
21
+
22
+ let of_list (m : (string * 'a) list ) : 'a t = Hashtbl. of_alist_exn (module String ) m
23
+
24
+ let wrap = of_list
25
+
26
+ let unwrap = to_list
27
+ end
28
+
14
29
module Re2 = struct
15
30
include Re2
16
31
17
32
let wrap s = create_exn s
18
33
let unwrap = Re2. to_string
19
34
end
20
35
36
+ open Devkit
37
+
21
38
let fmt_error fmt = Printf. ksprintf (fun s -> Error s) fmt
22
39
23
40
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