Imported Upstream version 3.07.2
authorSven Luther <luther@debian.org>
Tue, 18 Nov 2003 18:28:45 +0000 (18:28 +0000)
committerSven Luther <luther@debian.org>
Tue, 18 Nov 2003 18:28:45 +0000 (18:28 +0000)
19 files changed:
boot/ocamlc
boot/ocamllex
bytecomp/translmod.ml
camlp4/camlp4/ast2pt.ml
camlp4/etc/pa_o.ml
camlp4/meta/pa_r.ml
camlp4/meta/q_MLast.ml
camlp4/ocaml_src/camlp4/ast2pt.ml
camlp4/ocaml_src/meta/pa_r.ml
camlp4/ocaml_src/meta/q_MLast.ml
emacs/Makefile
emacs/caml-emacs.el
emacs/caml-types.el
emacs/caml-xemacs.el
emacs/caml.el
otherlibs/threads/scheduler.c
stdlib/buffer.mli
stdlib/pervasives.mli
stdlib/sys.ml

index 9de36cbdbb499d95d1639cb2d352d537b59cca74..db6172aac59c6fc71909e37b8d131faaa8ada689 100755 (executable)
Binary files a/boot/ocamlc and b/boot/ocamlc differ
index d502303cd197b79cea9edae71d124a5ded6eddeb..3164862a075e202aa598757ec9bef442c19ec011 100755 (executable)
Binary files a/boot/ocamllex and b/boot/ocamllex differ
index 11eaec52fa082c0d91fd33d9b33fa4961863ec0c..43b682664ad8b61711fcf2dc78367695fce9fa8c 100644 (file)
@@ -10,7 +10,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: translmod.ml,v 1.44 2003/07/07 13:42:49 xleroy Exp $ *)
+(* $Id: translmod.ml,v 1.45 2003/10/03 14:36:00 xleroy Exp $ *)
 
 (* Translation from typed abstract syntax to lambda terms,
    for the module language *)
@@ -310,11 +310,12 @@ and transl_structure fields cc rootpath = function
            transl_module Tcoerce_none (field_path rootpath id) modl,
            transl_structure (id :: fields) cc rootpath rem)
   | Tstr_recmodule bindings :: rem ->
+      let ext_fields = List.rev_append (List.map fst bindings) fields in
       compile_recmodule
         (fun id modl ->
           transl_module Tcoerce_none (field_path rootpath id) modl)
         bindings
-        (transl_structure (map_end fst bindings fields) cc rootpath rem)
+        (transl_structure ext_fields cc rootpath rem)
   | Tstr_modtype(id, decl) :: rem ->
       transl_structure fields cc rootpath rem
   | Tstr_open path :: rem ->
index 01ffdfa31cc3b4e1604948adf4275a9a811fda92..d47062a50f9c2e551721f2dabbe7726669b77ed6 100644 (file)
@@ -10,7 +10,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: ast2pt.ml,v 1.25 2003/07/16 18:59:12 mauny Exp $ *)
+(* $Id: ast2pt.ml,v 1.26 2003/09/30 14:39:26 mauny Exp $ *)
 
 open Stdpp;
 open MLast;
@@ -177,10 +177,10 @@ value rec ctyp =
   | TyObj loc fl v -> mktyp loc (Ptyp_object (meth_list loc fl v))
   | TyCls loc id ->
       mktyp loc (Ptyp_class (long_id_of_string_list loc id) [] [])
-  | TyLab loc _ _ -> error loc "labeled type not allowed here"
+  | TyLab loc _ _ -> error loc "labelled type not allowed here"
   | TyLid loc s -> mktyp loc (Ptyp_constr (lident s) [])
-  | TyMan loc _ _ -> error loc "type manifest not allowed here"
-  | TyOlb loc lab _ -> error loc "labeled type not allowed here"
+  | TyMan loc _ _ -> error loc "manifest type not allowed here"
+  | TyOlb loc lab _ -> error loc "labelled type not allowed here"
   | TyPol loc pl t -> mktyp loc (Ptyp_poly pl (ctyp t))
   | TyQuo loc s -> mktyp loc (Ptyp_var s)
   | TyRec loc _ _ -> error loc "record type not allowed here"
index 078f8229b0a891c449a7c1359c06ed8e517abec4..59559132e4121ec9935af3b69a5e5fae6b1e7ac4 100644 (file)
@@ -10,7 +10,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: pa_o.ml,v 1.52 2003/09/25 12:05:05 mauny Exp $ *)
+(* $Id: pa_o.ml,v 1.54 2003/09/30 14:39:38 mauny Exp $ *)
 
 open Stdpp;
 open Pcaml;
@@ -1148,16 +1148,16 @@ EXTEND
       | i = LIDENT -> [i] ] ]
   ;
   (* Labels *)
-  ctyp: AFTER "arrow"
-    [ NONA
+  ctyp: LEVEL "arrow"
+    [ RIGHTA
       [ i = lident_colon; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
-          <:ctyp< ~ $i$ : $t1$ -> $t2$ >>
+          <:ctyp< ( ~ $i$ : $t1$ ) -> $t2$ >>
       | i = OPTLABEL; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
-          <:ctyp< ? $i$ : $t1$ -> $t2$ >>
+          <:ctyp< ( ? $i$ : $t1$ ) -> $t2$ >>
       | i = QUESTIONIDENT; ":"; t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
-          <:ctyp< ? $i$ : $t1$ -> $t2$ >>
+          <:ctyp< ( ? $i$ : $t1$ ) -> $t2$ >>
       | "?"; i=lident_colon;t1 = ctyp LEVEL "star"; "->"; t2 = SELF ->
-          <:ctyp< ? $i$ : $t1$ -> $t2$ >> ] ]
+          <:ctyp< ( ? $i$ : $t1$ ) -> $t2$ >> ] ]
   ;
   ctyp: LEVEL "simple"
     [ [ "["; OPT "|"; rfl = LIST1 row_field SEP "|"; "]" ->
index 8554792e767ddb968d1875ee9cba0202765c5e04..c61eec69aa91f0d2222b077186a8b408d219e3cc 100644 (file)
@@ -10,7 +10,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: pa_r.ml,v 1.53 2003/09/25 12:05:06 mauny Exp $ *)
+(* $Id: pa_r.ml,v 1.55 2003/10/02 12:33:43 mauny Exp $ *)
 
 open Stdpp;
 open Pcaml;
@@ -542,6 +542,11 @@ EXTEND
           <:ctyp< ! $list:pl$ . $t$ >> ]
     | "arrow" RIGHTA
       [ t1 = SELF; "->"; t2 = SELF -> <:ctyp< $t1$ -> $t2$ >> ]
+    | "label" NONA
+      [ i = TILDEIDENT; ":"; t = SELF -> <:ctyp< ~ $i$ : $t$ >>
+      | i = LABEL; t =  SELF  -> <:ctyp< ~ $i$ : $t$ >>
+      | i = QUESTIONIDENT; ":"; t = SELF -> <:ctyp< ? $i$ : $t$ >>
+      | i = OPTLABEL; t = SELF -> <:ctyp< ? $i$ : $t$ >> ]
     | LEFTA
       [ t1 = SELF; t2 = SELF -> <:ctyp< $t1$ $t2$ >> ]
     | LEFTA
@@ -747,14 +752,6 @@ EXTEND
     [ [ m = UIDENT; "."; l = SELF -> [m :: l]
       | i = LIDENT -> [i] ] ]
   ;
-  (* Labels *)
-  ctyp: AFTER "arrow"
-    [ NONA
-      [ i = TILDEIDENT; ":"; t = SELF -> <:ctyp< ~ $i$ : $t$ >>
-      | i = LABEL; t = SELF -> <:ctyp< ~ $i$ : $t$ >>
-      | i = QUESTIONIDENT; ":"; t = SELF -> <:ctyp< ? $i$ : $t$ >> 
-      | i = OPTLABEL; t = SELF -> <:ctyp< ? $i$ : $t$ >> ] ]
-  ;
   ctyp: LEVEL "simple"
     [ [ "["; "="; rfl = row_field_list; "]" ->
           <:ctyp< [ = $list:rfl$ ] >>
index 5f98d871b0635e76b06a9dbe6754374e73bb1d9a..493a11004c4d0b6105705935f7d13d99a83cfff0 100644 (file)
@@ -10,7 +10,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: q_MLast.ml,v 1.51 2003/07/16 12:50:08 mauny Exp $ *)
+(* $Id: q_MLast.ml,v 1.53 2003/10/02 12:33:43 mauny Exp $ *)
 
 value gram = Grammar.gcreate (Plexer.gmake ());
 
@@ -127,7 +127,9 @@ value a_FLOAT = Grammar.Entry.create gram "a_FLOAT";
 value a_STRING = Grammar.Entry.create gram "a_STRING";
 value a_CHAR = Grammar.Entry.create gram "a_CHAR";
 value a_TILDEIDENT = Grammar.Entry.create gram "a_TILDEIDENT";
+value a_LABEL = Grammar.Entry.create gram "a_LABEL";
 value a_QUESTIONIDENT = Grammar.Entry.create gram "a_QUESTIONIDENT";
+value a_OPTLABEL = Grammar.Entry.create gram "a_OPTLABEL";
 
 value o2b =
   fun
@@ -793,6 +795,13 @@ EXTEND
           Qast.Node "TyPol" [Qast.Loc; pl; t] ]
     | "arrow" RIGHTA
       [ t1 = SELF; "->"; t2 = SELF -> Qast.Node "TyArr" [Qast.Loc; t1; t2] ]
+    | "label" NONA
+      [ i = a_TILDEIDENT; ":"; t = SELF -> Qast.Node "TyLab" [Qast.Loc; i; t]
+      | i = a_LABEL; t = SELF -> Qast.Node "TyLab" [Qast.Loc; i; t]
+      | i = a_QUESTIONIDENT; ":"; t = SELF ->
+          Qast.Node "TyOlb" [Qast.Loc; i; t]
+      | i = a_OPTLABEL; t = SELF ->
+          Qast.Node "TyOlb" [Qast.Loc; i; t] ]
     | LEFTA
       [ t1 = SELF; t2 = SELF -> Qast.Node "TyApp" [Qast.Loc; t1; t2] ]
     | LEFTA
@@ -1006,13 +1015,6 @@ EXTEND
     [ [ m = a_UIDENT; "."; l = SELF -> Qast.Cons m l
       | i = a_LIDENT -> Qast.List [i] ] ]
   ;
-  (* Labels *)
-  ctyp: AFTER "arrow"
-    [ NONA
-      [ i = a_TILDEIDENT; ":"; t = SELF -> Qast.Node "TyLab" [Qast.Loc; i; t]
-      | i = a_QUESTIONIDENT; ":"; t = SELF ->
-          Qast.Node "TyOlb" [Qast.Loc; i; t] ] ]
-  ;
   ctyp: LEVEL "simple"
     [ [ "["; "="; rfl = row_field_list; "]" ->
           Qast.Node "TyVrn" [Qast.Loc; rfl; Qast.Option None]
@@ -1044,11 +1046,16 @@ EXTEND
       | "#"; sl = mod_ident -> Qast.Node "PaTyp" [Qast.Loc; sl]
       | i = a_TILDEIDENT; ":"; p = SELF ->
           Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
+      | i = a_LABEL; p = SELF ->
+          Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
       | i = a_TILDEIDENT -> Qast.Node "PaLab" [Qast.Loc; i; Qast.Option None]
       | i = a_QUESTIONIDENT; ":"; "("; p = patt_tcon; eo = SOPT eq_expr;
         ")" ->
           Qast.Node "PaOlb"
             [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
+      | i = a_OPTLABEL; "("; p = patt_tcon; eo = SOPT eq_expr; ")" ->
+          Qast.Node "PaOlb"
+            [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
       | i = a_QUESTIONIDENT ->
           Qast.Node "PaOlb" [Qast.Loc; i; Qast.Option None]
       | "?"; "("; p = patt_tcon; eo = SOPT eq_expr; ")" ->
@@ -1063,11 +1070,16 @@ EXTEND
   ipatt:
     [ [ i = a_TILDEIDENT; ":"; p = SELF ->
           Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
+      | i = a_LABEL; p = SELF ->
+          Qast.Node "PaLab" [Qast.Loc; i; Qast.Option (Some p)]
       | i = a_TILDEIDENT -> Qast.Node "PaLab" [Qast.Loc; i; Qast.Option None]
       | i = a_QUESTIONIDENT; ":"; "("; p = ipatt_tcon; eo = SOPT eq_expr;
         ")" ->
           Qast.Node "PaOlb"
             [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
+      | i = a_OPTLABEL; "("; p = ipatt_tcon; eo = SOPT eq_expr; ")" ->
+          Qast.Node "PaOlb"
+            [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]
       | i = a_QUESTIONIDENT ->
           Qast.Node "PaOlb" [Qast.Loc; i; Qast.Option None]
       | "?"; "("; p = ipatt_tcon; eo = SOPT eq_expr; ")" ->
@@ -1086,9 +1098,13 @@ EXTEND
     [ "label" NONA
       [ i = a_TILDEIDENT; ":"; e = SELF ->
           Qast.Node "ExLab" [Qast.Loc; i; Qast.Option (Some e)]
+      | i = a_LABEL; e = SELF ->
+          Qast.Node "ExLab" [Qast.Loc; i; Qast.Option (Some e)]
       | i = a_TILDEIDENT -> Qast.Node "ExLab" [Qast.Loc; i; Qast.Option None]
       | i = a_QUESTIONIDENT; ":"; e = SELF ->
           Qast.Node "ExOlb" [Qast.Loc; i; Qast.Option (Some e)]
+      | i = a_OPTLABEL; e = SELF ->
+          Qast.Node "ExOlb" [Qast.Loc; i; Qast.Option (Some e)]
       | i = a_QUESTIONIDENT ->
           Qast.Node "ExOlb" [Qast.Loc; i; Qast.Option None] ] ]
   ;
@@ -1335,10 +1351,16 @@ EXTEND
     [ [ "~"; a = ANTIQUOT -> antiquot "" loc a
       | s = TILDEIDENT -> Qast.Str s ] ]
   ;
+  a_LABEL:
+    [ [ s = LABEL -> Qast.Str s ] ]
+  ;
   a_QUESTIONIDENT:
     [ [ "?"; a = ANTIQUOT -> antiquot "" loc a
       | s = QUESTIONIDENT -> Qast.Str s ] ]
   ;
+  a_OPTLABEL:
+    [ [ s = OPTLABEL -> Qast.Str s ] ]
+  ;
 END;
 
 value apply_entry e =
index d742b5563a4e9d7acba98d8d12128726bb73c88d..6839428ead37a3c3f1237c992fa6db272d905aee 100644 (file)
@@ -169,10 +169,10 @@ let rec ctyp =
   | TyObj (loc, fl, v) -> mktyp loc (Ptyp_object (meth_list loc fl v))
   | TyCls (loc, id) ->
       mktyp loc (Ptyp_class (long_id_of_string_list loc id, [], []))
-  | TyLab (loc, _, _) -> error loc "labeled type not allowed here"
+  | TyLab (loc, _, _) -> error loc "labelled type not allowed here"
   | TyLid (loc, s) -> mktyp loc (Ptyp_constr (lident s, []))
-  | TyMan (loc, _, _) -> error loc "type manifest not allowed here"
-  | TyOlb (loc, lab, _) -> error loc "labeled type not allowed here"
+  | TyMan (loc, _, _) -> error loc "manifest type not allowed here"
+  | TyOlb (loc, lab, _) -> error loc "labelled type not allowed here"
   | TyPol (loc, pl, t) -> mktyp loc (Ptyp_poly (pl, ctyp t))
   | TyQuo (loc, s) -> mktyp loc (Ptyp_var s)
   | TyRec (loc, _, _) -> error loc "record type not allowed here"
index 75d5c25431fe2ecffe40055f2355ddfb2b9b85cc..013adfa8d6256bb99a328b676cebc538e22a545c 100644 (file)
@@ -1540,6 +1540,25 @@ Grammar.extend
       Gramext.action
         (fun (t2 : 'ctyp) _ (t1 : 'ctyp) (loc : int * int) ->
            (MLast.TyArr (loc, t1, t2) : 'ctyp))];
+     Some "label", Some Gramext.NonA,
+     [[Gramext.Stoken ("OPTLABEL", ""); Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) (i : string) (loc : int * int) ->
+           (MLast.TyOlb (loc, i, t) : 'ctyp));
+      [Gramext.Stoken ("QUESTIONIDENT", ""); Gramext.Stoken ("", ":");
+       Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) _ (i : string) (loc : int * int) ->
+           (MLast.TyOlb (loc, i, t) : 'ctyp));
+      [Gramext.Stoken ("LABEL", ""); Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) (i : string) (loc : int * int) ->
+           (MLast.TyLab (loc, i, t) : 'ctyp));
+      [Gramext.Stoken ("TILDEIDENT", ""); Gramext.Stoken ("", ":");
+       Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) _ (i : string) (loc : int * int) ->
+           (MLast.TyLab (loc, i, t) : 'ctyp))];
      None, Some Gramext.LeftA,
      [[Gramext.Sself; Gramext.Sself],
       Gramext.action
@@ -2241,27 +2260,6 @@ Grammar.extend
         (fun (l : 'class_longident) _ (m : string) (loc : int * int) ->
            (m :: l : 'class_longident))]];
     Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e),
-    Some (Gramext.After "arrow"),
-    [None, Some Gramext.NonA,
-     [[Gramext.Stoken ("OPTLABEL", ""); Gramext.Sself],
-      Gramext.action
-        (fun (t : 'ctyp) (i : string) (loc : int * int) ->
-           (MLast.TyOlb (loc, i, t) : 'ctyp));
-      [Gramext.Stoken ("QUESTIONIDENT", ""); Gramext.Stoken ("", ":");
-       Gramext.Sself],
-      Gramext.action
-        (fun (t : 'ctyp) _ (i : string) (loc : int * int) ->
-           (MLast.TyOlb (loc, i, t) : 'ctyp));
-      [Gramext.Stoken ("LABEL", ""); Gramext.Sself],
-      Gramext.action
-        (fun (t : 'ctyp) (i : string) (loc : int * int) ->
-           (MLast.TyLab (loc, i, t) : 'ctyp));
-      [Gramext.Stoken ("TILDEIDENT", ""); Gramext.Stoken ("", ":");
-       Gramext.Sself],
-      Gramext.action
-        (fun (t : 'ctyp) _ (i : string) (loc : int * int) ->
-           (MLast.TyLab (loc, i, t) : 'ctyp))]];
-    Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e),
     Some (Gramext.Level "simple"),
     [None, None,
      [[Gramext.Stoken ("", "["); Gramext.Stoken ("", "<");
index f1a1d85cfd068bdff18d5c931b0df58741b680de..70540af642a027e10ba1a50cfdb4a3625e0805a7 100644 (file)
@@ -153,7 +153,9 @@ let a_FLOAT = Grammar.Entry.create gram "a_FLOAT";;
 let a_STRING = Grammar.Entry.create gram "a_STRING";;
 let a_CHAR = Grammar.Entry.create gram "a_CHAR";;
 let a_TILDEIDENT = Grammar.Entry.create gram "a_TILDEIDENT";;
+let a_LABEL = Grammar.Entry.create gram "a_LABEL";;
 let a_QUESTIONIDENT = Grammar.Entry.create gram "a_QUESTIONIDENT";;
+let a_OPTLABEL = Grammar.Entry.create gram "a_OPTLABEL";;
 
 let o2b =
   function
@@ -626,7 +628,7 @@ Grammar.extend
                 Qast.Tuple [xx1; xx2; xx3] -> xx1, xx2, xx3
               | _ ->
                   match () with
-                  _ -> raise (Match_failure ("q_MLast.ml", 300, 19))
+                  _ -> raise (Match_failure ("q_MLast.ml", 302, 19))
             in
             Qast.Node ("StExc", [Qast.Loc; c; tl; b]) :
             'str_item));
@@ -896,7 +898,7 @@ Grammar.extend
                 Qast.Tuple [xx1; xx2; xx3] -> xx1, xx2, xx3
               | _ ->
                   match () with
-                  _ -> raise (Match_failure ("q_MLast.ml", 358, 19))
+                  _ -> raise (Match_failure ("q_MLast.ml", 360, 19))
             in
             Qast.Node ("SgExc", [Qast.Loc; c; tl]) :
             'sig_item));
@@ -2254,6 +2256,32 @@ Grammar.extend
       Gramext.action
         (fun (t2 : 'ctyp) _ (t1 : 'ctyp) (loc : int * int) ->
            (Qast.Node ("TyArr", [Qast.Loc; t1; t2]) : 'ctyp))];
+     Some "label", Some Gramext.NonA,
+     [[Gramext.Snterm
+         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
+       Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) (i : 'a_OPTLABEL) (loc : int * int) ->
+           (Qast.Node ("TyOlb", [Qast.Loc; i; t]) : 'ctyp));
+      [Gramext.Snterm
+         (Grammar.Entry.obj
+            (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
+       Gramext.Stoken ("", ":"); Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) _ (i : 'a_QUESTIONIDENT) (loc : int * int) ->
+           (Qast.Node ("TyOlb", [Qast.Loc; i; t]) : 'ctyp));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
+       Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) (i : 'a_LABEL) (loc : int * int) ->
+           (Qast.Node ("TyLab", [Qast.Loc; i; t]) : 'ctyp));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
+       Gramext.Stoken ("", ":"); Gramext.Sself],
+      Gramext.action
+        (fun (t : 'ctyp) _ (i : 'a_TILDEIDENT) (loc : int * int) ->
+           (Qast.Node ("TyLab", [Qast.Loc; i; t]) : 'ctyp))];
      None, Some Gramext.LeftA,
      [[Gramext.Sself; Gramext.Sself],
       Gramext.action
@@ -3345,22 +3373,6 @@ Grammar.extend
         (fun (l : 'class_longident) _ (m : 'a_UIDENT) (loc : int * int) ->
            (Qast.Cons (m, l) : 'class_longident))]];
     Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e),
-    Some (Gramext.After "arrow"),
-    [None, Some Gramext.NonA,
-     [[Gramext.Snterm
-         (Grammar.Entry.obj
-            (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
-       Gramext.Stoken ("", ":"); Gramext.Sself],
-      Gramext.action
-        (fun (t : 'ctyp) _ (i : 'a_QUESTIONIDENT) (loc : int * int) ->
-           (Qast.Node ("TyOlb", [Qast.Loc; i; t]) : 'ctyp));
-      [Gramext.Snterm
-         (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
-       Gramext.Stoken ("", ":"); Gramext.Sself],
-      Gramext.action
-        (fun (t : 'ctyp) _ (i : 'a_TILDEIDENT) (loc : int * int) ->
-           (Qast.Node ("TyLab", [Qast.Loc; i; t]) : 'ctyp))]];
-    Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e),
     Some (Gramext.Level "simple"),
     [None, None,
      [[Gramext.Stoken ("", "["); Gramext.Stoken ("", "<");
@@ -3517,6 +3529,30 @@ Grammar.extend
       Gramext.action
         (fun (i : 'a_QUESTIONIDENT) (loc : int * int) ->
            (Qast.Node ("PaOlb", [Qast.Loc; i; Qast.Option None]) : 'patt));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
+       Gramext.Stoken ("", "(");
+       Gramext.Snterm
+         (Grammar.Entry.obj (patt_tcon : 'patt_tcon Grammar.Entry.e));
+       Gramext.srules
+         [[Gramext.Sopt
+             (Gramext.Snterm
+                (Grammar.Entry.obj (eq_expr : 'eq_expr Grammar.Entry.e)))],
+          Gramext.action
+            (fun (a : 'eq_expr option) (loc : int * int) ->
+               (Qast.Option a : 'a_opt));
+          [Gramext.Snterm
+             (Grammar.Entry.obj (a_opt : 'a_opt Grammar.Entry.e))],
+          Gramext.action
+            (fun (a : 'a_opt) (loc : int * int) -> (a : 'a_opt))];
+       Gramext.Stoken ("", ")")],
+      Gramext.action
+        (fun _ (eo : 'a_opt) (p : 'patt_tcon) _ (i : 'a_OPTLABEL)
+           (loc : int * int) ->
+           (Qast.Node
+              ("PaOlb",
+               [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]) :
+            'patt));
       [Gramext.Snterm
          (Grammar.Entry.obj
             (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
@@ -3547,6 +3583,13 @@ Grammar.extend
       Gramext.action
         (fun (i : 'a_TILDEIDENT) (loc : int * int) ->
            (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option None]) : 'patt));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
+       Gramext.Sself],
+      Gramext.action
+        (fun (p : 'patt) (i : 'a_LABEL) (loc : int * int) ->
+           (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option (Some p)]) :
+            'patt));
       [Gramext.Snterm
          (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
        Gramext.Stoken ("", ":"); Gramext.Sself],
@@ -3605,6 +3648,30 @@ Grammar.extend
       Gramext.action
         (fun (i : 'a_QUESTIONIDENT) (loc : int * int) ->
            (Qast.Node ("PaOlb", [Qast.Loc; i; Qast.Option None]) : 'ipatt));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
+       Gramext.Stoken ("", "(");
+       Gramext.Snterm
+         (Grammar.Entry.obj (ipatt_tcon : 'ipatt_tcon Grammar.Entry.e));
+       Gramext.srules
+         [[Gramext.Sopt
+             (Gramext.Snterm
+                (Grammar.Entry.obj (eq_expr : 'eq_expr Grammar.Entry.e)))],
+          Gramext.action
+            (fun (a : 'eq_expr option) (loc : int * int) ->
+               (Qast.Option a : 'a_opt));
+          [Gramext.Snterm
+             (Grammar.Entry.obj (a_opt : 'a_opt Grammar.Entry.e))],
+          Gramext.action
+            (fun (a : 'a_opt) (loc : int * int) -> (a : 'a_opt))];
+       Gramext.Stoken ("", ")")],
+      Gramext.action
+        (fun _ (eo : 'a_opt) (p : 'ipatt_tcon) _ (i : 'a_OPTLABEL)
+           (loc : int * int) ->
+           (Qast.Node
+              ("PaOlb",
+               [Qast.Loc; i; Qast.Option (Some (Qast.Tuple [p; eo]))]) :
+            'ipatt));
       [Gramext.Snterm
          (Grammar.Entry.obj
             (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
@@ -3635,6 +3702,13 @@ Grammar.extend
       Gramext.action
         (fun (i : 'a_TILDEIDENT) (loc : int * int) ->
            (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option None]) : 'ipatt));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
+       Gramext.Sself],
+      Gramext.action
+        (fun (p : 'ipatt) (i : 'a_LABEL) (loc : int * int) ->
+           (Qast.Node ("PaLab", [Qast.Loc; i; Qast.Option (Some p)]) :
+            'ipatt));
       [Gramext.Snterm
          (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
        Gramext.Stoken ("", ":"); Gramext.Sself],
@@ -3668,6 +3742,13 @@ Grammar.extend
       Gramext.action
         (fun (i : 'a_QUESTIONIDENT) (loc : int * int) ->
            (Qast.Node ("ExOlb", [Qast.Loc; i; Qast.Option None]) : 'expr));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e));
+       Gramext.Sself],
+      Gramext.action
+        (fun (e : 'expr) (i : 'a_OPTLABEL) (loc : int * int) ->
+           (Qast.Node ("ExOlb", [Qast.Loc; i; Qast.Option (Some e)]) :
+            'expr));
       [Gramext.Snterm
          (Grammar.Entry.obj
             (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e));
@@ -3681,6 +3762,13 @@ Grammar.extend
       Gramext.action
         (fun (i : 'a_TILDEIDENT) (loc : int * int) ->
            (Qast.Node ("ExLab", [Qast.Loc; i; Qast.Option None]) : 'expr));
+      [Gramext.Snterm
+         (Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e));
+       Gramext.Sself],
+      Gramext.action
+        (fun (e : 'expr) (i : 'a_LABEL) (loc : int * int) ->
+           (Qast.Node ("ExLab", [Qast.Loc; i; Qast.Option (Some e)]) :
+            'expr));
       [Gramext.Snterm
          (Grammar.Entry.obj (a_TILDEIDENT : 'a_TILDEIDENT Grammar.Entry.e));
        Gramext.Stoken ("", ":"); Gramext.Sself],
@@ -4427,6 +4515,11 @@ Grammar.extend
      Gramext.action
        (fun (a : string) _ (loc : int * int) ->
           (antiquot "" loc a : 'a_TILDEIDENT))]];
+   Grammar.Entry.obj (a_LABEL : 'a_LABEL Grammar.Entry.e), None,
+   [None, None,
+    [[Gramext.Stoken ("LABEL", "")],
+     Gramext.action
+       (fun (s : string) (loc : int * int) -> (Qast.Str s : 'a_LABEL))]];
    Grammar.Entry.obj (a_QUESTIONIDENT : 'a_QUESTIONIDENT Grammar.Entry.e),
    None,
    [None, None,
@@ -4437,7 +4530,12 @@ Grammar.extend
      [Gramext.Stoken ("", "?"); Gramext.Stoken ("ANTIQUOT", "")],
      Gramext.action
        (fun (a : string) _ (loc : int * int) ->
-          (antiquot "" loc a : 'a_QUESTIONIDENT))]]];;
+          (antiquot "" loc a : 'a_QUESTIONIDENT))]];
+   Grammar.Entry.obj (a_OPTLABEL : 'a_OPTLABEL Grammar.Entry.e), None,
+   [None, None,
+    [[Gramext.Stoken ("OPTLABEL", "")],
+     Gramext.action
+       (fun (s : string) (loc : int * int) -> (Qast.Str s : 'a_OPTLABEL))]]];;
 
 let apply_entry e =
   let f s = Grammar.Entry.parse e (Stream.of_string s) in
index c68fa6a3ca751406a14ac92374c79521d7ef8991..4ef434c3731f7580e5347329dba336390d2ba8d3 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.15 2003/08/29 15:38:28 doligez Exp $
+# $Id: Makefile,v 1.16 2003/10/10 13:25:38 remy Exp $
 
 include ../config/Makefile
 
@@ -24,6 +24,7 @@ COMPILECMD=(progn \
               (byte-compile-file "caml.el") \
               (byte-compile-file "inf-caml.el") \
               (byte-compile-file "caml-help.el") \
+              (byte-compile-file "caml-types.el") \
               (byte-compile-file "camldebug.el"))
 
 install:
index 25132eea56014aa068afdefe8a4a28106e4d5b0d..b212db655c7d79ab9a13f1b2f0d12fde0d00f8f0 100644 (file)
@@ -8,7 +8,7 @@
 (defun caml-event-window (e) (posn-window (event-start e)))
 (defun caml-event-point-start (e) (posn-point (event-start e)))
 (defun caml-event-point-end (e) (posn-point (event-end e)))
-(defalias 'caml-track-mouse 'track-mouse)
 (defalias 'caml-read-event 'read-event)
+(defmacro caml-track-mouse (&rest body) (cons 'track-mouse body))
 
 (provide 'caml-emacs)
index b4c43df6daf7b485b3ddb1bdd0d4d74bce67ef12..d8654ce97657c1fd0d680adfa117e6637caa38d9 100644 (file)
@@ -10,7 +10,7 @@
 ;(*                                                                     *)
 ;(***********************************************************************)
 
-;(* $Id: caml-types.el,v 1.24 2003/09/05 18:01:46 remy Exp $ *)
+;(* $Id: caml-types.el,v 1.26 2003/10/11 00:00:14 doligez Exp $ *)
 
 ; An emacs-lisp complement to the "-dtypes" option of ocamlc and ocamlopt.
 
@@ -21,6 +21,8 @@
       (require 'caml-xemacs)
     (require 'caml-emacs)))
 
+
+
 (defvar caml-types-location-re nil "Regexp to parse *.annot files.
 
 Annotation files *.annot may be generated with the \"-dtypes\" option 
@@ -160,8 +162,10 @@ See `caml-types-location-re' for annotation file format.
          (target-file (file-name-nondirectory (buffer-file-name)))
          (target-date (nth 5 (file-attributes target-file))))
     (unless (and caml-types-annotation-tree
+                 type-date
+                 caml-types-annotation-date
                  (not (caml-types-date< caml-types-annotation-date type-date)))
-      (if (caml-types-date< type-date target-date)
+      (if (and type-date target-date (caml-types-date< type-date target-date))
           (error (format "%s is more recent than %s" target-file type-file)))
       (message "Reading annotation file...")
       (let* ((type-buf (caml-types-find-file type-file))
@@ -376,10 +380,13 @@ See `caml-types-location-re' for annotation file format.
      (with-current-buffer buf (toggle-read-only 1))
      )
    (t
-    (error "No annotation file. You may compile with \"-dtypes\" option"))
+    (error "No annotation file. You should compile with option \"-dtypes\"."))
     )
   buf))
 
+(defun caml-types-mouse-ignore (event)
+  (interactive "e")
+  nil)
 
 (defun caml-types-explore (event)
   "Explore type annotations by mouse dragging.
@@ -395,58 +402,79 @@ and its type is displayed in the minibuffer, until the move is released."
          (target-line) (target-bol)
          target-pos
          Left Right limits cnum node mes type
-         (tree caml-types-annotation-tree)
          region
+         target-tree
          )
-    (caml-types-preprocess type-file)
-    (unless caml-types-buffer 
-      (setq caml-types-buffer (get-buffer-create caml-types-buffer-name)))
-      ;; (message "Drag the mouse to explore types")
     (unwind-protect
-        (caml-track-mouse
-         (setq region
-               (caml-types-typed-make-overlay target-buf
-                                        (caml-event-point-start event)))
-         (while (and event
-                     (integer-or-marker-p
-                      (setq cnum (caml-event-point-end event))))
-           (if (and region (<= (car region) cnum) (<= cnum (cdr region)))
-               (if (and limits (>= cnum (car limits)) (< cnum (cdr limits)))
-                   (message mes)
-                 (setq target-bol
-                       (save-excursion (goto-char cnum)
-                                       (caml-line-beginning-position)))
-                 (setq target-line
-                       (1+ (count-lines (point-min) target-bol)))
-                 (setq target-pos (vector target-file target-line target-bol cnum))
-                 (save-excursion
-                   (setq node (caml-types-find-location target-pos () tree))
-                   (set-buffer caml-types-buffer)
-                   (erase-buffer)
-                   (cond
-                    (node
-                     (setq Left (caml-types-get-pos target-buf (elt node 0)))
-                     (setq Right (caml-types-get-pos target-buf (elt node 1)))
-                     (move-overlay caml-types-expr-ovl Left Right target-buf)
-                     (setq limits (caml-types-find-interval target-buf target-pos
-                                                            node))
-                     (setq type (elt node 2))
-                     )
-                    (t
-                     (delete-overlay caml-types-expr-ovl)
-                     (setq type "*no type information*")
-                     (setq limits (caml-types-find-interval target-buf target-pos
-                                                            tree))
-                     ))
-                   (message (setq mes (format "type: %s" type)))
-                   (insert type)
-                   )))
-             (setq event (caml-read-event))
-             (unless (mouse-movement-p event) (setq event nil))
-             )
-         )
-      (delete-overlay caml-types-expr-ovl)
-      (delete-overlay caml-types-typed-ovl)
+        (progn
+          (caml-types-preprocess type-file)
+          (setq target-tree caml-types-annotation-tree)
+          (unless caml-types-buffer 
+            (setq caml-types-buffer
+                  (get-buffer-create caml-types-buffer-name)))
+          ;; (message "Drag the mouse to explore types")
+          (unwind-protect
+              (caml-track-mouse
+               (setq region
+                     (caml-types-typed-make-overlay
+                      target-buf (caml-event-point-start event)))
+               (while (and event
+                           (integer-or-marker-p
+                            (setq cnum (caml-event-point-end event))))
+                 (if (and region (<= (car region) cnum) (< cnum (cdr region)))
+                     (if (and limits
+                              (>= cnum (car limits)) (< cnum (cdr limits)))
+                         (message mes)
+                       (setq target-bol
+                             (save-excursion
+                               (goto-char cnum) (caml-line-beginning-position))
+                             target-line (1+ (count-lines (point-min)
+                                                          target-bol))
+                             target-pos
+                             (vector target-file target-line target-bol cnum))
+                       (save-excursion
+                         (setq node (caml-types-find-location
+                                     target-pos () target-tree))
+                         (set-buffer caml-types-buffer)
+                         (erase-buffer)
+                         (cond
+                          (node
+                           (setq Left
+                                 (caml-types-get-pos target-buf (elt node 0))
+                                 Right
+                                 (caml-types-get-pos target-buf (elt node 1)))
+                           (move-overlay
+                            caml-types-expr-ovl Left Right target-buf)
+                           (setq limits
+                                 (caml-types-find-interval target-buf
+                                                           target-pos node)
+                                 type (elt node 2))
+                           )
+                          (t
+                           (delete-overlay caml-types-expr-ovl)
+                           (setq type "*no type information*")
+                           (setq limits
+                                 (caml-types-find-interval
+                                  target-buf target-pos target-tree))
+                           ))
+                         (message (setq mes (format "type: %s" type)))
+                         (insert type)
+                         )))
+                 (setq event (caml-read-event))
+                 (unless (mouse-movement-p event) (setq event nil))
+                 )
+               )
+            (delete-overlay caml-types-expr-ovl)
+            (delete-overlay caml-types-typed-ovl)
+            ))
+      ;; the mouse is down. One should prevent against mouse release,
+      ;; which could do something undesirable.
+      ;; In most common cases, next event will be mouse release.
+      ;; However, it could also be a key stroke before mouse release.
+      ;; Will then execute the action for mouse release (if bound).
+      ;; Emacs does not allow to test whether mouse is up or down.
+      ;; Same problem may happen above while exploring
+      (if (and event (caml-read-event)))
       )))
 
 (defun caml-types-typed-make-overlay (target-buf pos)
@@ -459,7 +487,7 @@ and its type is displayed in the minibuffer, until the move is released."
         (if (and (equal target-buf (current-buffer))
                  (setq left (caml-types-get-pos target-buf (elt node 0))
                        right (caml-types-get-pos target-buf (elt node 1)))
-                 (<= left pos) (>= right pos)
+                 (<= left pos) (> right pos)
                  )
             (setq start (min start left)
                   end (max end right))
index 9fae982c93978027b0752e172f61e47827b7c17d..b1b01bd63e33e1525e8e3d939fe43c36743650f4 100644 (file)
@@ -12,8 +12,9 @@
 (defun caml-event-window (e) (event-window e))
 (defun caml-event-point-start (e) (event-closest-point e))
 (defun caml-event-point-end (e) (event-closest-point e))
-(defalias 'caml-track-mouse 'progn)
 (defalias 'caml-read-event 'next-event)
+(defmacro caml-track-mouse (&rest body) (cons 'progn body))
+
 (defun mouse-movement-p (e) (equal (event-type e) 'motion))
 
 (provide 'caml-xemacs)
index 68b4ee43c325cf73bd1c54c27b3f709b84959c0c..74ad3731b21bb9ca17a04a875166f43fef67bc61 100644 (file)
@@ -283,6 +283,8 @@ have caml-electric-indent on, which see.")
 
   ;; caml-types
   (define-key caml-mode-map [?\C-c?\C-t] 'caml-types-show-type)
+  ;; to prevent misbehavior in case of error during exploration.
+  (define-key caml-mode-map [mouse-2] 'caml-types-mouse-ignore)
   (define-key caml-mode-map [down-mouse-2] 'caml-types-explore)
   ;; caml-help
   (define-key caml-mode-map [?\C-c?i] 'ocaml-add-path)
index b17dc1cdece9a2b88ed183c36f5aca5edce940c9..400de65cf9663eb7133cd06e2cf19884e5e98c05 100644 (file)
@@ -11,7 +11,7 @@
 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: scheduler.c,v 1.56 2003/03/20 16:23:03 xleroy Exp $ */
+/* $Id: scheduler.c,v 1.57 2003/10/10 13:13:21 doligez Exp $ */
 
 /* The thread scheduler */
 
 
 /* The thread descriptors */
 
-struct thread_struct {
+struct caml_thread_struct {
   value ident;                  /* Unique id (for equality comparisons) */
-  struct thread_struct * next;  /* Double linking of threads */
-  struct thread_struct * prev;
+  struct caml_thread_struct * next;  /* Double linking of threads */
+  struct caml_thread_struct * prev;
   value * stack_low;            /* The execution stack for this thread */
   value * stack_high;
   value * stack_threshold;
@@ -94,7 +94,7 @@ struct thread_struct {
   value retval;                 /* Value to return when thread resumes */
 };
 
-typedef struct thread_struct * thread_t;
+typedef struct caml_thread_struct * caml_thread_t;
 
 #define RUNNABLE Val_int(0)
 #define KILLED Val_int(1)
@@ -122,7 +122,7 @@ typedef struct thread_struct * thread_t;
 #define DELAY_INFTY 1E30        /* +infty, for this purpose */
 
 /* The thread currently active */
-static thread_t curr_thread = NULL;
+static caml_thread_t curr_thread = NULL;
 /* Identifier for next thread creation */
 static value next_ident = Val_int(0);
 
@@ -134,7 +134,7 @@ static void (*prev_scan_roots_hook) (scanning_action);
 
 static void thread_scan_roots(scanning_action action)
 {
-  thread_t th, start;
+  caml_thread_t th, start;
 
   /* Scan all active descriptors */
   start = curr_thread;
@@ -161,7 +161,8 @@ value thread_initialize(value unit)       /* ML */
   if (curr_thread != NULL) return Val_unit;
   /* Create a descriptor for the current thread */
   curr_thread =
-    (thread_t) alloc_shr(sizeof(struct thread_struct) / sizeof(value), 0);
+    (caml_thread_t) alloc_shr(sizeof(struct caml_thread_struct)
+                              / sizeof(value), 0);
   curr_thread->ident = next_ident;
   next_ident = Val_int(Int_val(next_ident) + 1);
   curr_thread->next = curr_thread;
@@ -218,10 +219,11 @@ value thread_initialize_preemption(value unit)     /* ML */
 
 value thread_new(value clos)          /* ML */
 {
-  thread_t th;
+  caml_thread_t th;
   /* Allocate the thread and its stack */
   Begin_root(clos);
-    th = (thread_t) alloc_shr(sizeof(struct thread_struct) / sizeof(value), 0);
+    th = (caml_thread_t) alloc_shr(sizeof(struct caml_thread_struct)
+                                   / sizeof(value), 0);
   End_roots();
   th->ident = next_ident;
   next_ident = Val_int(Int_val(next_ident) + 1);
@@ -268,7 +270,7 @@ value thread_new(value clos)          /* ML */
 
 value thread_id(value th)             /* ML */
 {
-  return ((struct thread_struct *)th)->ident;
+  return ((caml_thread_t)th)->ident;
 }
 
 /* Return the current time as a floating-point number */
@@ -293,7 +295,7 @@ static void find_bad_fds(value fdl, fd_set *set);
 
 static value schedule_thread(void)
 {
-  thread_t run_thread, th;
+  caml_thread_t run_thread, th;
   fd_set readfds, writefds, exceptfds;
   double delay, now;
   int need_select, need_wait;
@@ -353,7 +355,7 @@ try_again:
       }
     }
     if (th->status & (BLOCKED_JOIN - 1)) {
-      if (((thread_t)(th->joining))->status == KILLED) {
+      if (((caml_thread_t)(th->joining))->status == KILLED) {
         th->status = RUNNABLE;
         Assign(th->retval, RESUMED_JOIN);
       }
@@ -682,7 +684,7 @@ value thread_join(value th)          /* ML */
 {
   check_callback();
   Assert(curr_thread != NULL);
-  if (((thread_t)th)->status == KILLED) return Val_unit;
+  if (((caml_thread_t)th)->status == KILLED) return Val_unit;
   curr_thread->status = BLOCKED_JOIN;
   Assign(curr_thread->joining, th);
   return schedule_thread();
@@ -703,7 +705,7 @@ value thread_wait_pid(value pid)          /* ML */
 
 value thread_wakeup(value thread)     /* ML */
 {
-  thread_t th = (thread_t) thread;
+  caml_thread_t th = (caml_thread_t) thread;
   switch (th->status) {
   case SUSPENDED:
     th->status = RUNNABLE;
@@ -730,7 +732,7 @@ value thread_self(value unit)         /* ML */
 value thread_kill(value thread)       /* ML */
 {
   value retval = Val_unit;
-  thread_t th = (thread_t) thread;
+  caml_thread_t th = (caml_thread_t) thread;
   if (th->status == KILLED) failwith("Thread.kill: killed thread");
   /* Don't paint ourselves in a corner */
   if (th == th->next) failwith("Thread.kill: cannot kill the last thread");
@@ -740,7 +742,7 @@ value thread_kill(value thread)       /* ML */
   if (th == curr_thread) {
     Begin_root(thread);
     retval = schedule_thread();
-    th = (thread_t) thread;
+    th = (caml_thread_t) thread;
     End_roots();
   }
   /* Remove thread from the doubly-linked list */
index 3cbf63ef858677c89b83ecb9cfb79d4bc85e10f9..73e02e299b4744ea95088572d17b7ac978bf059c 100644 (file)
@@ -74,7 +74,7 @@ val add_substitute : t -> (string -> string) -> string -> unit
    - a non empty sequence of alphanumeric or [_] characters,
    - an arbitrary sequence of characters enclosed by a pair of
    matching parentheses or curly brackets.
-   An escaped [$] character is a [$] that immediately folows a backslash
+   An escaped [$] character is a [$] that immediately follows a backslash
    character; it then stands for a plain [$].
    Raise [Not_found] if the closing character of a parenthesized variable
    cannot be found. *)
index 67d2b12a957f46d4f0e1e9b5446e3d520196859b..46630824d6ef8b6a36d7a69d1919da55e06e35c7 100644 (file)
@@ -11,7 +11,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: pervasives.mli,v 1.93 2003/09/04 12:44:48 doligez Exp $ *)
+(* $Id: pervasives.mli,v 1.94 2003/10/08 13:13:33 weis Exp $ *)
 
 (** The initially opened module.
 
@@ -800,7 +800,7 @@ type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
 
 external string_of_format :
   ('a, 'b, 'c, 'd) format4 -> string = "%identity"
-(** Converts a format string into a string.*)
+(** Converts a format string into a string. *)
 external format_of_string :
   ('a, 'b, 'c, 'd) format4 -> ('a, 'b, 'c, 'd) format4 = "%identity"
 (** [format_of_string s] returns a format string read from the string
index 349067c0d1df31f60bb502871c8824dd4d7ec216..f516a94a3d91fd724916bcc81cb63d5e9d3cf4b4 100644 (file)
@@ -11,7 +11,7 @@
 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: sys.ml,v 1.78 2003/09/12 07:46:23 xleroy Exp $ *)
+(* $Id: sys.ml,v 1.80 2003/10/13 07:39:46 xleroy Exp $ *)
 
 (* System interface *)
 
@@ -78,4 +78,4 @@ let catch_break on =
 
 (* OCaml version string, must be in the format described in sys.mli. *)
 
-let ocaml_version = "3.07";;
+let ocaml_version = "3.07+2";;