This is an automated email from the git hooks/post-receive script.

treinen pushed a commit to branch master
in repository ocaml-visitors.

commit 67dbf57582833838cac8f92d464979bf54984de6
Author: Ralf Treinen <trei...@free.fr>
Date:   Mon Oct 30 20:21:26 2017 +0100

    migrate to ocaml 4.05
---
 debian/changelog          |  7 +++++
 debian/patches/ocaml-4.05 | 70 +++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series     |  1 +
 3 files changed, 78 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 5be3382..92a67d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ocaml-visitors (20170725-2) unstable; urgency=medium
+
+  * Patch ocaml-4.05: migrate to ocaml 4.05, patch picked from upstream git
+    (closes: #880063)
+
+ -- Ralf Treinen <trei...@debian.org>  Mon, 30 Oct 2017 20:20:56 +0100
+
 ocaml-visitors (20170725-1) unstable; urgency=medium
 
   * New upstream release. This release fixes compilation on bytecode
diff --git a/debian/patches/ocaml-4.05 b/debian/patches/ocaml-4.05
new file mode 100644
index 0000000..100bdc8
--- /dev/null
+++ b/debian/patches/ocaml-4.05
@@ -0,0 +1,70 @@
+Author: Fran├žois Pottier <francois.pott...@inria.fr>
+Description: compile with ocaml 4.05
+Upstream-commit: 07948b5b9207d87d510b920dc72c7ea08b267ea5      
+
+diff --git a/src/Visitors.ml b/src/Visitors.ml
+index 0ad37aa..2fea732 100644
+--- a/src/Visitors.ml
++++ b/src/Visitors.ml
+@@ -387,7 +387,7 @@ let ty_env =
+ 
+ let tyvar_visitor_method_type =
+   if X.poly "env" then
+-    Typ.poly ["env"] (ty_arrow ty_env ty_any)
++    typ_poly ["env"] (ty_arrow ty_env ty_any)
+   else
+     ty_any
+ 
+@@ -538,7 +538,7 @@ let quantify (alphas : tyvars) (ty : core_type) : 
core_type =
+       alphas
+   in
+   (* Done. *)
+-  Typ.poly alphas ty
++  typ_poly alphas ty
+ 
+ (* -------------------------------------------------------------------------- 
*)
+ 
+diff --git a/src/VisitorsCompatibility.cppo.ml 
b/src/VisitorsCompatibility.cppo.ml
+index 71b6b0f..d263409 100644
+--- a/src/VisitorsCompatibility.cppo.ml
++++ b/src/VisitorsCompatibility.cppo.ml
+@@ -1,3 +1,4 @@
++let mknoloc = Location.mknoloc
+ open Asttypes
+ open Parsetree
+ open Ast_helper
+@@ -68,3 +69,21 @@ let data_constructor_variety (cd : constructor_declaration) 
=
+     | Pcstr_record lds ->
+         DataInlineRecord (ld_labels lds, ld_tys lds)
+   #endif
++
++(* Between OCaml 4.04 and OCaml 4.05, the types of several functions in 
[Ast_helper]
++   have changed. They used to take arguments of type [string], and now take 
arguments
++   of type [str], thus requiring a conversion. These functions include 
[Typ.object_],
++   [Typ.poly], [Exp.send], [Exp.newtype], [Ctf.val_], [Ctf.method_], 
[Cf.inherit_].  *)
++
++let string2str (s : string) =
++  #if OCAML_VERSION < (4, 05, 0)
++    s
++  #else
++    mknoloc s
++  #endif
++
++let typ_poly (tyvars : string list) (cty : core_type) : core_type =
++  Typ.poly (List.map string2str tyvars) cty
++
++let exp_send (e : expression) (m : string) : expression =
++  Exp.send e (string2str m)
+diff --git a/src/VisitorsGeneration.ml b/src/VisitorsGeneration.ml
+index 01fae98..2d656c2 100644
+--- a/src/VisitorsGeneration.ml
++++ b/src/VisitorsGeneration.ml
+@@ -467,7 +467,7 @@ let is_virtual (Meth (_, _, oe, _)) : bool =
+ (* [send o m es] produces a call to the method [o#m] with arguments [es]. *)
+ 
+ let send (o : variable) (m : methode) (es : expressions) : expression =
+-  app (Exp.send (evar o) m) es
++  app (exp_send (evar o) m) es
+ 
+ (* -------------------------------------------------------------------------- 
*)
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cd802a8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+ocaml-4.05

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-ocaml-maint/packages/ocaml-visitors.git

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to