9
9
; bug_reports : string option
10
10
; documentation : string option
11
11
; maintainers : string list option
12
+ ; maintenance_intent : string list option
12
13
}
13
14
14
15
let source t = t.source
@@ -29,6 +30,7 @@ let bug_reports t =
29
30
30
31
let documentation t = t.documentation
31
32
let maintainers t = t.maintainers
33
+ let maintenance_intent t = t.maintenance_intent
32
34
33
35
let empty =
34
36
{ source = None
@@ -38,6 +40,7 @@ let empty =
38
40
; bug_reports = None
39
41
; documentation = None
40
42
; maintainers = None
43
+ ; maintenance_intent = None
41
44
}
42
45
;;
43
46
@@ -54,10 +57,20 @@ let example ~authors ~maintainers ~license =
54
57
(* homepage and bug_reports are inferred from the source *)
55
58
; homepage = None
56
59
; bug_reports = None
60
+ ; maintenance_intent = None
57
61
}
58
62
;;
59
63
60
- let to_dyn { source; license; authors; homepage; bug_reports; documentation; maintainers }
64
+ let to_dyn
65
+ { source
66
+ ; license
67
+ ; authors
68
+ ; homepage
69
+ ; bug_reports
70
+ ; documentation
71
+ ; maintainers
72
+ ; maintenance_intent
73
+ }
61
74
=
62
75
let open Dyn in
63
76
record
@@ -67,18 +80,28 @@ let to_dyn { source; license; authors; homepage; bug_reports; documentation; mai
67
80
; " documentation" , (option string ) documentation
68
81
; " bug_reports" , (option string ) bug_reports
69
82
; " maintainers" , option (list string ) maintainers
83
+ ; " maintenance_intent" , option (list string ) maintenance_intent
70
84
; " authors" , option (list string ) authors
71
85
]
72
86
;;
73
87
74
88
let encode_fields
75
- { source; authors; license; homepage; documentation; bug_reports; maintainers }
89
+ { source
90
+ ; authors
91
+ ; license
92
+ ; homepage
93
+ ; documentation
94
+ ; bug_reports
95
+ ; maintainers
96
+ ; maintenance_intent
97
+ }
76
98
=
77
99
let open Encoder in
78
100
record_fields
79
101
[ field_o " source" Source_kind. encode source
80
102
; field_l " authors" string (Option. value ~default: [] authors)
81
103
; field_l " maintainers" string (Option. value ~default: [] maintainers)
104
+ ; field_l " maintenance_intent" string (Option. value ~default: [] maintenance_intent)
82
105
; field_l " license" string (Option. value ~default: [] license)
83
106
; field_o " homepage" string homepage
84
107
; field_o " documentation" string documentation
@@ -109,8 +132,18 @@ let decode ?since () =
109
132
field_o " bug_reports" (Syntax. since Stanza. syntax (v (1 , 10 )) >>> string )
110
133
and + maintainers =
111
134
field_o " maintainers" (Syntax. since Stanza. syntax (v (1 , 10 )) >>> repeat string )
135
+ and + maintenance_intent =
136
+ field_o " maintenance_intent" (Syntax. since Stanza. syntax (v (3 , 18 )) >>> repeat string )
112
137
in
113
- { source; authors; license; homepage; documentation; bug_reports; maintainers }
138
+ { source
139
+ ; authors
140
+ ; license
141
+ ; homepage
142
+ ; documentation
143
+ ; bug_reports
144
+ ; maintainers
145
+ ; maintenance_intent
146
+ }
114
147
;;
115
148
116
149
let superpose t1 t2 =
@@ -126,9 +159,27 @@ let superpose t1 t2 =
126
159
; documentation = f t1.documentation t2.documentation
127
160
; bug_reports = f t1.bug_reports t2.bug_reports
128
161
; maintainers = f t1.maintainers t2.maintainers
162
+ ; maintenance_intent = f t1.maintenance_intent t2.maintenance_intent
129
163
}
130
164
;;
131
165
132
- let create ~maintainers ~authors ~homepage ~bug_reports ~documentation ~license ~source =
133
- { maintainers; authors; homepage; bug_reports; documentation; license; source }
166
+ let create
167
+ ~maintainers
168
+ ~maintenance_intent
169
+ ~authors
170
+ ~homepage
171
+ ~bug_reports
172
+ ~documentation
173
+ ~license
174
+ ~source
175
+ =
176
+ { maintainers
177
+ ; authors
178
+ ; homepage
179
+ ; bug_reports
180
+ ; documentation
181
+ ; license
182
+ ; source
183
+ ; maintenance_intent
184
+ }
134
185
;;
0 commit comments