1 |
commit: ec74deb5656e4df02f37c7b48fb972b324d4c3da |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 1 18:21:07 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 09:13:52 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec74deb5 |
7 |
|
8 |
dev-ml/ppx_core: use more recent upstream patch for ocaml 4.03 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
dev-ml/ppx_core/files/oc43.patch | 115 +++++++++++++++++++++++++++------------ |
14 |
1 file changed, 81 insertions(+), 34 deletions(-) |
15 |
|
16 |
diff --git a/dev-ml/ppx_core/files/oc43.patch b/dev-ml/ppx_core/files/oc43.patch |
17 |
index d5f961d..ebc23ef 100644 |
18 |
--- a/dev-ml/ppx_core/files/oc43.patch |
19 |
+++ b/dev-ml/ppx_core/files/oc43.patch |
20 |
@@ -1,6 +1,18 @@ |
21 |
-diff -uNr ppx_core-113.33.00/_oasis ppx_core-113.33.00+4.03/_oasis |
22 |
+diff -uNr ppx_core-113.33.00/js-utils/gen_install.ml ppx_core-113.33.01+4.03/js-utils/gen_install.ml |
23 |
+--- ppx_core-113.33.00/js-utils/gen_install.ml 2016-03-09 16:44:53.000000000 +0100 |
24 |
++++ ppx_core-113.33.01+4.03/js-utils/gen_install.ml 2016-04-18 12:14:21.000000000 +0200 |
25 |
+@@ -31,7 +31,7 @@ |
26 |
+ |> List.map (fun line -> Scanf.sscanf line "%[^=]=%S" (fun k v -> (k, v))) |
27 |
+ |
28 |
+ let remove_cwd = |
29 |
+- let prefix = Sys.getcwd () ^ "/" in |
30 |
++ let prefix = Sys.getcwd () ^ Filename.dir_sep in |
31 |
+ let len_prefix = String.length prefix in |
32 |
+ fun fn -> |
33 |
+ let len = String.length fn in |
34 |
+diff -uNr ppx_core-113.33.00/_oasis ppx_core-113.33.01+4.03/_oasis |
35 |
--- ppx_core-113.33.00/_oasis 2016-03-09 16:44:53.000000000 +0100 |
36 |
-+++ ppx_core-113.33.00+4.03/_oasis 2016-03-23 17:20:19.000000000 +0100 |
37 |
++++ ppx_core-113.33.01+4.03/_oasis 2016-04-18 12:14:21.000000000 +0200 |
38 |
@@ -1,8 +1,8 @@ |
39 |
OASISFormat: 0.4 |
40 |
-OCamlVersion: >= 4.02.3 |
41 |
@@ -8,14 +20,48 @@ diff -uNr ppx_core-113.33.00/_oasis ppx_core-113.33.00+4.03/_oasis |
42 |
FindlibVersion: >= 1.3.2 |
43 |
Name: ppx_core |
44 |
-Version: 113.33.00 |
45 |
-+Version: 113.33.00+4.03 |
46 |
++Version: 113.33.01+4.03 |
47 |
Synopsis: Standard library for ppx rewriters |
48 |
Authors: Jane Street Group, LLC <opensource@××××××××××.com> |
49 |
Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@××××××××××.com> |
50 |
-diff -uNr ppx_core-113.33.00/src/ast_builder.ml ppx_core-113.33.00+4.03/src/ast_builder.ml |
51 |
+diff -uNr ppx_core-113.33.00/opam ppx_core-113.33.01+4.03/opam |
52 |
+--- ppx_core-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 |
53 |
++++ ppx_core-113.33.01+4.03/opam 2016-04-18 12:27:13.000000000 +0200 |
54 |
+@@ -14,4 +14,4 @@ |
55 |
+ "ocamlfind" {build & >= "1.3.2"} |
56 |
+ "ppx_tools" {>= "0.99.3"} |
57 |
+ ] |
58 |
+-available: [ ocaml-version >= "4.02.3" ] |
59 |
++available: [ ocaml-version >= "4.03.0" ] |
60 |
+diff -uNr ppx_core-113.33.00/src/ast_builder_intf.ml ppx_core-113.33.01+4.03/src/ast_builder_intf.ml |
61 |
+--- ppx_core-113.33.00/src/ast_builder_intf.ml 2016-03-09 16:44:53.000000000 +0100 |
62 |
++++ ppx_core-113.33.01+4.03/src/ast_builder_intf.ml 2016-04-18 12:14:21.000000000 +0200 |
63 |
+@@ -44,6 +44,11 @@ |
64 |
+ val elist : (expression list -> expression) with_loc |
65 |
+ val plist : (pattern list -> pattern ) with_loc |
66 |
+ |
67 |
++ val pstr_value_list : |
68 |
++ loc:Location.t -> Asttypes.rec_flag -> value_binding list -> structure_item list |
69 |
++ (** [pstr_value_list ~loc rf vbs] = [pstr_value ~loc rf vbs] if [vbs <> []], [[]] |
70 |
++ otherwise. *) |
71 |
++ |
72 |
+ val nonrec_type_declaration : |
73 |
+ (name:string Location.loc |
74 |
+ -> params:(core_type * Asttypes.variance) list |
75 |
+diff -uNr ppx_core-113.33.00/src/ast_builder.ml ppx_core-113.33.01+4.03/src/ast_builder.ml |
76 |
--- ppx_core-113.33.00/src/ast_builder.ml 2016-03-09 16:44:53.000000000 +0100 |
77 |
-+++ ppx_core-113.33.00+4.03/src/ast_builder.ml 2016-03-23 17:20:19.000000000 +0100 |
78 |
-@@ -28,21 +28,21 @@ |
79 |
++++ ppx_core-113.33.01+4.03/src/ast_builder.ml 2016-04-18 12:14:21.000000000 +0200 |
80 |
+@@ -22,27 +22,31 @@ |
81 |
+ |
82 |
+ include Ast_builder_generated.M |
83 |
+ |
84 |
++ let pstr_value_list ~loc rec_flag = function |
85 |
++ | [] -> [] |
86 |
++ | vbs -> [pstr_value ~loc rec_flag vbs] |
87 |
++ |
88 |
+ let nonrec_type_declaration ~loc ~name ~params ~cstrs ~kind ~private_ ~manifest = |
89 |
+ let td = type_declaration ~loc ~name ~params ~cstrs ~kind ~private_ ~manifest in |
90 |
+ { td with ptype_attributes = |
91 |
({ txt = "nonrec"; loc }, PStr []) :: td.ptype_attributes } |
92 |
;; |
93 |
|
94 |
@@ -52,7 +98,7 @@ diff -uNr ppx_core-113.33.00/src/ast_builder.ml ppx_core-113.33.00+4.03/src/ast_ |
95 |
|
96 |
let ebool ~loc t = pexp_construct ~loc (Located.lident ~loc (string_of_bool t)) None |
97 |
let pbool ~loc t = ppat_construct ~loc (Located.lident ~loc (string_of_bool t)) None |
98 |
-@@ -77,10 +77,11 @@ |
99 |
+@@ -77,10 +81,11 @@ |
100 |
| _ -> pexp_apply ~loc e el |
101 |
;; |
102 |
|
103 |
@@ -66,9 +112,18 @@ diff -uNr ppx_core-113.33.00/src/ast_builder.ml ppx_core-113.33.00+4.03/src/ast_ |
104 |
;; |
105 |
|
106 |
let pconstruct cd arg = ppat_construct ~loc:cd.pcd_loc (Located.map_lident cd.pcd_name) arg |
107 |
-diff -uNr ppx_core-113.33.00/src/ast_pattern.ml ppx_core-113.33.00+4.03/src/ast_pattern.ml |
108 |
+@@ -111,6 +116,8 @@ |
109 |
+ module Make(Loc : sig val loc : Location.t end) : S = struct |
110 |
+ include Ast_builder_generated.Make(Loc) |
111 |
+ |
112 |
++ let pstr_value_list = Default.pstr_value_list |
113 |
++ |
114 |
+ let nonrec_type_declaration ~name ~params ~cstrs ~kind ~private_ ~manifest = |
115 |
+ Default.nonrec_type_declaration ~loc ~name ~params ~cstrs ~kind ~private_ ~manifest |
116 |
+ ;; |
117 |
+diff -uNr ppx_core-113.33.00/src/ast_pattern.ml ppx_core-113.33.01+4.03/src/ast_pattern.ml |
118 |
--- ppx_core-113.33.00/src/ast_pattern.ml 2016-03-09 16:44:53.000000000 +0100 |
119 |
-+++ ppx_core-113.33.00+4.03/src/ast_pattern.ml 2016-03-23 17:20:19.000000000 +0100 |
120 |
++++ ppx_core-113.33.01+4.03/src/ast_pattern.ml 2016-04-18 12:14:21.000000000 +0200 |
121 |
@@ -80,6 +80,13 @@ |
122 |
|
123 |
let ( >>| ) t f = map t ~f |
124 |
@@ -134,9 +189,9 @@ diff -uNr ppx_core-113.33.00/src/ast_pattern.ml ppx_core-113.33.00+4.03/src/ast_ |
125 |
|
126 |
let attribute (T f1) (T f2) = T (fun ctx loc ((name : _ Location.loc), payload) k -> |
127 |
let k = f1 ctx name.loc name.txt k in |
128 |
-diff -uNr ppx_core-113.33.00/src/ast_pattern.mli ppx_core-113.33.00+4.03/src/ast_pattern.mli |
129 |
+diff -uNr ppx_core-113.33.00/src/ast_pattern.mli ppx_core-113.33.01+4.03/src/ast_pattern.mli |
130 |
--- ppx_core-113.33.00/src/ast_pattern.mli 2016-03-09 16:44:53.000000000 +0100 |
131 |
-+++ ppx_core-113.33.00+4.03/src/ast_pattern.mli 2016-03-23 17:20:19.000000000 +0100 |
132 |
++++ ppx_core-113.33.01+4.03/src/ast_pattern.mli 2016-04-18 12:14:21.000000000 +0200 |
133 |
@@ -115,6 +115,10 @@ |
134 |
one. *) |
135 |
val alt : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t |
136 |
@@ -168,9 +223,9 @@ diff -uNr ppx_core-113.33.00/src/ast_pattern.mli ppx_core-113.33.00+4.03/src/ast |
137 |
|
138 |
val attribute : (string, 'a, 'b) t -> (payload, 'b, 'c) t -> (attribute, 'a, 'c) t |
139 |
val extension : (string, 'a, 'b) t -> (payload, 'b, 'c) t -> (attribute, 'a, 'c) t |
140 |
-diff -uNr ppx_core-113.33.00/src/attribute.ml ppx_core-113.33.00+4.03/src/attribute.ml |
141 |
+diff -uNr ppx_core-113.33.00/src/attribute.ml ppx_core-113.33.01+4.03/src/attribute.ml |
142 |
--- ppx_core-113.33.00/src/attribute.ml 2016-03-09 16:44:53.000000000 +0100 |
143 |
-+++ ppx_core-113.33.00+4.03/src/attribute.ml 2016-03-23 17:20:19.000000000 +0100 |
144 |
++++ ppx_core-113.33.01+4.03/src/attribute.ml 2016-04-18 12:14:21.000000000 +0200 |
145 |
@@ -15,6 +15,10 @@ |
146 |
; "ocaml.doc" |
147 |
; "ocaml.text" |
148 |
@@ -240,15 +295,7 @@ diff -uNr ppx_core-113.33.00/src/attribute.ml ppx_core-113.33.00+4.03/src/attrib |
149 |
|
150 |
(* |
151 |
let pattern : type a b c d. a t |
152 |
-@@ -435,6 +455,7 @@ |
153 |
- method! attribute (name, _) = |
154 |
- Location.raise_errorf ~loc:name.loc |
155 |
- "attribute not expected here, Ppx_core.Std.Attribute needs updating!" |
156 |
-+ name.txt |
157 |
- |
158 |
- method private check_node : type a. a Context.t -> a -> a = fun context node -> |
159 |
- let attrs = Context.get_attributes context node in |
160 |
-@@ -480,6 +501,7 @@ |
161 |
+@@ -480,6 +500,7 @@ |
162 |
method! module_expr x = super#module_expr (self#check_node Context.Module_expr x) |
163 |
method! value_binding x = super#value_binding (self#check_node Context.Value_binding x) |
164 |
method! module_binding x = super#module_binding (self#check_node Context.Module_binding x) |
165 |
@@ -256,9 +303,9 @@ diff -uNr ppx_core-113.33.00/src/attribute.ml ppx_core-113.33.00+4.03/src/attrib |
166 |
|
167 |
method! class_field x = |
168 |
let x = self#check_node Context.Class_field x in |
169 |
-diff -uNr ppx_core-113.33.00/src/attribute.mli ppx_core-113.33.00+4.03/src/attribute.mli |
170 |
+diff -uNr ppx_core-113.33.00/src/attribute.mli ppx_core-113.33.01+4.03/src/attribute.mli |
171 |
--- ppx_core-113.33.00/src/attribute.mli 2016-03-09 16:44:53.000000000 +0100 |
172 |
-+++ ppx_core-113.33.00+4.03/src/attribute.mli 2016-03-23 17:20:19.000000000 +0100 |
173 |
++++ ppx_core-113.33.01+4.03/src/attribute.mli 2016-04-18 12:14:21.000000000 +0200 |
174 |
@@ -42,6 +42,7 @@ |
175 |
val pstr_eval : structure_item t |
176 |
val pstr_extension : structure_item t |
177 |
@@ -267,9 +314,9 @@ diff -uNr ppx_core-113.33.00/src/attribute.mli ppx_core-113.33.00+4.03/src/attri |
178 |
end |
179 |
|
180 |
(** [declare fully_qualified_name context payload_pattern k] declares an attribute. [k] is |
181 |
-diff -uNr ppx_core-113.33.00/src/common.ml ppx_core-113.33.00+4.03/src/common.ml |
182 |
+diff -uNr ppx_core-113.33.00/src/common.ml ppx_core-113.33.01+4.03/src/common.ml |
183 |
--- ppx_core-113.33.00/src/common.ml 2016-03-09 16:44:53.000000000 +0100 |
184 |
-+++ ppx_core-113.33.00+4.03/src/common.ml 2016-03-23 17:20:19.000000000 +0100 |
185 |
++++ ppx_core-113.33.01+4.03/src/common.ml 2016-04-18 12:14:21.000000000 +0200 |
186 |
@@ -16,7 +16,7 @@ |
187 |
List.fold_right |
188 |
(fun (tp, _variance) acc -> |
189 |
@@ -298,9 +345,9 @@ diff -uNr ppx_core-113.33.00/src/common.ml ppx_core-113.33.00+4.03/src/common.ml |
190 |
| PTyp t -> t.ptyp_loc |
191 |
| PPat (x, None) -> x.ppat_loc |
192 |
| PPat (x, Some e) -> { x.ppat_loc with loc_end = e.pexp_loc.loc_end } |
193 |
-diff -uNr ppx_core-113.33.00/src/gen/common.ml ppx_core-113.33.00+4.03/src/gen/common.ml |
194 |
+diff -uNr ppx_core-113.33.00/src/gen/common.ml ppx_core-113.33.01+4.03/src/gen/common.ml |
195 |
--- ppx_core-113.33.00/src/gen/common.ml 2016-03-09 16:44:53.000000000 +0100 |
196 |
-+++ ppx_core-113.33.00+4.03/src/gen/common.ml 2016-03-23 17:20:19.000000000 +0100 |
197 |
++++ ppx_core-113.33.01+4.03/src/gen/common.ml 2016-04-18 12:14:21.000000000 +0200 |
198 |
@@ -70,8 +70,13 @@ |
199 |
| Type_variant cds -> |
200 |
List.fold_left cds ~init:acc |
201 |
@@ -317,9 +364,9 @@ diff -uNr ppx_core-113.33.00/src/gen/common.ml ppx_core-113.33.00+4.03/src/gen/c |
202 |
| Type_abstract -> |
203 |
match td.type_manifest with |
204 |
| None -> acc |
205 |
-diff -uNr ppx_core-113.33.00/src/gen/gen_ast_builder.ml ppx_core-113.33.00+4.03/src/gen/gen_ast_builder.ml |
206 |
+diff -uNr ppx_core-113.33.00/src/gen/gen_ast_builder.ml ppx_core-113.33.01+4.03/src/gen/gen_ast_builder.ml |
207 |
--- ppx_core-113.33.00/src/gen/gen_ast_builder.ml 2016-03-09 16:44:53.000000000 +0100 |
208 |
-+++ ppx_core-113.33.00+4.03/src/gen/gen_ast_builder.ml 2016-03-23 17:20:19.000000000 +0100 |
209 |
++++ ppx_core-113.33.01+4.03/src/gen/gen_ast_builder.ml 2016-04-18 12:14:21.000000000 +0200 |
210 |
@@ -121,57 +121,60 @@ |
211 |
open M |
212 |
|
213 |
@@ -442,9 +489,9 @@ diff -uNr ppx_core-113.33.00/src/gen/gen_ast_builder.ml ppx_core-113.33.00+4.03/ |
214 |
) |
215 |
in |
216 |
(* let body = |
217 |
-diff -uNr ppx_core-113.33.00/src/gen/gen_ast_pattern.ml ppx_core-113.33.00+4.03/src/gen/gen_ast_pattern.ml |
218 |
+diff -uNr ppx_core-113.33.00/src/gen/gen_ast_pattern.ml ppx_core-113.33.01+4.03/src/gen/gen_ast_pattern.ml |
219 |
--- ppx_core-113.33.00/src/gen/gen_ast_pattern.ml 2016-03-09 16:44:53.000000000 +0100 |
220 |
-+++ ppx_core-113.33.00+4.03/src/gen/gen_ast_pattern.ml 2016-03-23 17:20:19.000000000 +0100 |
221 |
++++ ppx_core-113.33.01+4.03/src/gen/gen_ast_pattern.ml 2016-04-18 12:14:21.000000000 +0200 |
222 |
@@ -157,66 +157,69 @@ |
223 |
] |
224 |
|
225 |
@@ -582,9 +629,9 @@ diff -uNr ppx_core-113.33.00/src/gen/gen_ast_pattern.ml ppx_core-113.33.00+4.03/ |
226 |
in |
227 |
[%stri let [%p pvar (Common.function_name_of_path path)] = [%e body]] |
228 |
;; |
229 |
-diff -uNr ppx_core-113.33.00/src/gen/gen.ml ppx_core-113.33.00+4.03/src/gen/gen.ml |
230 |
+diff -uNr ppx_core-113.33.00/src/gen/gen.ml ppx_core-113.33.01+4.03/src/gen/gen.ml |
231 |
--- ppx_core-113.33.00/src/gen/gen.ml 2016-03-09 16:44:53.000000000 +0100 |
232 |
-+++ ppx_core-113.33.00+4.03/src/gen/gen.ml 2016-03-23 17:20:19.000000000 +0100 |
233 |
++++ ppx_core-113.33.01+4.03/src/gen/gen.ml 2016-04-18 12:14:21.000000000 +0200 |
234 |
@@ -23,7 +23,7 @@ |
235 |
|
236 |
method apply |