[Pkg-ocaml-maint-commits] [SCM] camlp5 packaging branch, master, updated. debian/6.02.1-1-6-gd98fe3c

Stephane Glondu steph at glondu.net
Mon Apr 18 13:02:39 UTC 2011


The following commit has been merged in the master branch:
commit 19245ebe2cacb4b0095ef1ea1ad2c99737ed5a48
Author: Stephane Glondu <steph at glondu.net>
Date:   Mon Apr 18 12:12:53 2011 +0200

    Import upstream patches 6.02.2-[23]

diff --git a/debian/patches/0001-Upstream-patch-6.02.2-1.patch b/debian/patches/0001-Upstream-patch-6.02.2-1.patch
index 8d273ac..3fb4f91 100644
--- a/debian/patches/0001-Upstream-patch-6.02.2-1.patch
+++ b/debian/patches/0001-Upstream-patch-6.02.2-1.patch
@@ -1,6 +1,6 @@
 From: Daniel de Rauglaudre <daniel.de_rauglaudre at inria.fr>
 Date: Wed, 16 Mar 2011 23:52:48 +0100
-Subject: [PATCH] Upstream patch 6.02.2-1
+Subject: Upstream patch 6.02.2-1
 
  * [16 Mar 11] Fixed bug: incorrect compilation of label patterns of
    the form ~a:b (or ~{a = b} in revised syntax) in class
diff --git a/debian/patches/0002-Upstream-patch-6.02.2-2.patch b/debian/patches/0002-Upstream-patch-6.02.2-2.patch
new file mode 100644
index 0000000..40f2ec7
--- /dev/null
+++ b/debian/patches/0002-Upstream-patch-6.02.2-2.patch
@@ -0,0 +1,155 @@
+From: Daniel de Rauglaudre <daniel.de_rauglaudre at inria.fr>
+Date: Mon, 18 Apr 2011 12:09:58 +0200
+Subject: Upstream patch 6.02.2-2
+
+Origin: upstream, http://pauillac.inria.fr/~ddr/camlp5/distrib/src/patch-6.02.2-2
+---
+ main/ast2pt.ml           |   33 +++++++++++----------------------
+ ocaml_src/main/ast2pt.ml |   33 +++++++++++----------------------
+ 2 files changed, 22 insertions(+), 44 deletions(-)
+
+diff --git a/main/ast2pt.ml b/main/ast2pt.ml
+index e35c8ae..948e552 100644
+--- a/main/ast2pt.ml
++++ b/main/ast2pt.ml
+@@ -725,6 +725,13 @@ value varify_constructors var_names =
+     | t -> t ]
+ ;
+ 
++value label_of_patt =
++  fun
++  [ PaLid _ s -> uv s
++  | PaTyc _ (PaLid _ s) _ -> uv s
++  | p -> error (MLast.loc_of_patt p) "label_of_patt; case not impl" ]
++;
++
+ value rec expr =
+   fun
+   [ ExAcc loc x <:expr< val >> ->
+@@ -856,12 +863,7 @@ value rec expr =
+       [ [(PaLab ploc lppo, w, e)] ->
+           List.fold_right
+             (fun (p, po) e -> do {
+-               let lab =
+-                 match p with
+-                 [ PaLid _ lab -> uv lab
+-                 | PaTyc _ (PaLid _ lab) _ -> uv lab
+-                 | _ -> error loc "not impl label for that patt 1" ]
+-               in
++               let lab = label_of_patt p in
+                let p =
+                  match uv po with
+                  [ Some p -> p
+@@ -878,12 +880,7 @@ value rec expr =
+               | None -> mkexp loc (newtype (uv s) (expr e)) ]
+           | None -> error loc "(type ..) not in this ocaml version" ]
+       | [(PaOlb loc p eo, w, e)] ->
+-          let lab =
+-            match p with
+-            [ PaLid _ lab -> uv lab
+-            | PaTyc _ (PaLid _ lab) _ -> uv lab
+-            | _ -> error loc "not impl label for that patt 2" ]
+-          in
++          let lab = label_of_patt p in
+           let (p, eo) =
+             match uv eo with
+             [ Some (ExOlb _ p eo) -> (p, eo)
+@@ -1326,11 +1323,7 @@ and class_expr =
+       [ Some pcl_fun ->
+           match uv lppo with
+           [ [(p, po)] -> do {
+-              let lab =
+-                match p with
+-                [ PaLid _ s -> uv s
+-                | p -> error loc "label not implemented in that case 2" ]
+-              in
++              let lab = label_of_patt p in
+               let p =
+                 match uv po with
+                 [ Some p -> p
+@@ -1343,11 +1336,7 @@ and class_expr =
+   | CeFun loc (PaOlb _ p eo) ce ->
+       match ocaml_pcl_fun with
+       [ Some pcl_fun ->
+-          let lab =
+-            match p with
+-            [ PaLid _ s -> uv s
+-            | p -> error loc "label not implemented in that case 4" ]
+-          in
++          let lab = label_of_patt p in
+           let (p, eo) =
+             match uv eo with
+             [ Some (ExOlb _ p eo) -> (p, eo)
+diff --git a/ocaml_src/main/ast2pt.ml b/ocaml_src/main/ast2pt.ml
+index b244699..7fd9009 100644
+--- a/ocaml_src/main/ast2pt.ml
++++ b/ocaml_src/main/ast2pt.ml
+@@ -881,6 +881,13 @@ let varify_constructors var_names =
+   loop
+ ;;
+ 
++let label_of_patt =
++  function
++    PaLid (_, s) -> uv s
++  | PaTyc (_, PaLid (_, s), _) -> uv s
++  | p -> error (MLast.loc_of_patt p) "label_of_patt; case not impl"
++;;
++
+ let rec expr =
+   function
+     ExAcc (loc, x, MLast.ExLid (_, "val")) ->
+@@ -1015,12 +1022,7 @@ let rec expr =
+         [PaLab (ploc, lppo), w, e] ->
+           List.fold_right
+             (fun (p, po) e ->
+-               let lab =
+-                 match p with
+-                   PaLid (_, lab) -> uv lab
+-                 | PaTyc (_, PaLid (_, lab), _) -> uv lab
+-                 | _ -> error loc "not impl label for that patt 1"
+-               in
++               let lab = label_of_patt p in
+                let p =
+                  match uv po with
+                    Some p -> p
+@@ -1038,12 +1040,7 @@ let rec expr =
+           | None -> error loc "(type ..) not in this ocaml version"
+           end
+       | [PaOlb (loc, p, eo), w, e] ->
+-          let lab =
+-            match p with
+-              PaLid (_, lab) -> uv lab
+-            | PaTyc (_, PaLid (_, lab), _) -> uv lab
+-            | _ -> error loc "not impl label for that patt 2"
+-          in
++          let lab = label_of_patt p in
+           let (p, eo) =
+             match uv eo with
+               Some (ExOlb (_, p, eo)) -> p, eo
+@@ -1522,11 +1519,7 @@ and class_expr =
+         Some pcl_fun ->
+           begin match uv lppo with
+             [p, po] ->
+-              let lab =
+-                match p with
+-                  PaLid (_, s) -> uv s
+-                | p -> error loc "label not implemented in that case 2"
+-              in
++              let lab = label_of_patt p in
+               let p =
+                 match uv po with
+                   Some p -> p
+@@ -1540,11 +1533,7 @@ and class_expr =
+   | CeFun (loc, PaOlb (_, p, eo), ce) ->
+       begin match ocaml_pcl_fun with
+         Some pcl_fun ->
+-          let lab =
+-            match p with
+-              PaLid (_, s) -> uv s
+-            | p -> error loc "label not implemented in that case 4"
+-          in
++          let lab = label_of_patt p in
+           let (p, eo) =
+             match uv eo with
+               Some (ExOlb (_, p, eo)) -> p, eo
+-- 
diff --git a/debian/patches/0003-Upstream-patch-6.02.2-3.patch b/debian/patches/0003-Upstream-patch-6.02.2-3.patch
new file mode 100644
index 0000000..d043420
--- /dev/null
+++ b/debian/patches/0003-Upstream-patch-6.02.2-3.patch
@@ -0,0 +1,27 @@
+From: Daniel de Rauglaudre <daniel.de_rauglaudre at inria.fr>
+Date: Mon, 18 Apr 2011 12:11:07 +0200
+Subject: Upstream patch 6.02.2-3
+
+ * [24 Mar 11] Fixed bug: M.(a+b) was refused in normal syntax.
+
+Origin: upstream, http://pauillac.inria.fr/~ddr/camlp5/distrib/src/patch-6.02.2-3
+---
+ etc/pa_o.ml |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/etc/pa_o.ml b/etc/pa_o.ml
+index eef8f72..e821c19 100644
+--- a/etc/pa_o.ml
++++ b/etc/pa_o.ml
+@@ -720,7 +720,9 @@ EXTEND
+           in
+           loop <:expr< $_uid:i$ >> j
+       | i = V UIDENT; "."; "("; j = operator_rparen ->
+-          <:expr< $_uid:i$ . $lid:j$ >> ] ]
++          <:expr< $_uid:i$ . $lid:j$ >>
++      | i = V UIDENT; "."; "("; e = expr; ")" ->
++          <:expr< $_uid:i$ . ( $e$ ) >> ] ]
+   ;
+   (* Patterns *)
+   patt:
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 553ccfc..1ad3f67 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 0001-Upstream-patch-6.02.2-1.patch
+0002-Upstream-patch-6.02.2-2.patch
+0003-Upstream-patch-6.02.2-3.patch

-- 
camlp5 packaging



More information about the Pkg-ocaml-maint-commits mailing list