Skip to content

Commit 63e9eab

Browse files
committed
move generic atd wrappers to separate file
1 parent 5083f31 commit 63e9eab

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

lib/common.atd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
type 'v map_as_object =
2+
(string * 'v) list <json repr="object">
3+
wrap <ocaml module="Common.StringMap" t="'v Common.StringMap.t">

lib/dune

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
(preprocess
77
(pps lwt_ppx)))
88

9+
(rule
10+
(targets common_t.ml common_t.mli)
11+
(deps common.atd)
12+
(action
13+
(run atdgen -t %{deps})))
14+
15+
(rule
16+
(targets common_j.ml common_j.mli)
17+
(deps common.atd)
18+
(action
19+
(run atdgen -j -j-std %{deps})))
20+
921
(rule
1022
(targets github_t.ml github_t.mli)
1123
(deps github.atd)

lib/slack.atd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type 'v map_as_object <ocaml from="State"> = abstract
1+
type 'v map_as_object <ocaml from="Common"> = abstract
22

33
type message_field = {
44
?title: string nullable;

lib/state.atd

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
type status_state <ocaml from="Github"> = abstract
2-
3-
type 'v map_as_object =
4-
(string * 'v) list <json repr="object">
5-
wrap <ocaml module="Common.StringMap" t="'v Common.StringMap.t">
2+
type 'v map_as_object <ocaml from="Common"> = abstract
63

74
(* A map from branch names to build statuses *)
85
type branch_statuses = status_state map_as_object

0 commit comments

Comments
 (0)