Commits

camlspotter committed e1d5f65

added let! to make world

Comments (0)

Files changed (10)

Binary file modified.

Binary file modified.

camlp4/boot/camlp4boot.ml

           and _ = (a_INT32 : 'a_INT32 Gram.Entry.t)
           and _ = (a_INT : 'a_INT Gram.Entry.t)
           and _ = (a_FLOAT : 'a_FLOAT Gram.Entry.t) in
-          let grammar_entry_create = Gram.Entry.mk in
+          let! grammar_entry_create = Gram.Entry.mk in
           let (* Here it's LABEL and not tilde_label since ~a:b is different than ~a : b *)
             (* Same remark for ?a:b *) infixop5 : 'infixop5 Gram.Entry.t =
             grammar_entry_create "infixop5"
                                 (_loc : Gram.Loc.t) ->
                                 (Ast.WcAnd (_loc, wc1, wc2) : 'with_constr)))) ]) ]))
                   ());
-             Gram.extend (expr : 'expr Gram.Entry.t)
+             Obj.magic Gram.extend (expr : 'expr Gram.Entry.t)
                ((fun () ->
                    (None,
                     [ ((Some "top"), (Some Camlp4.Sig.Grammar.RightA),
                           (Gram.Action.mk
                              (fun (e2 : 'expr) (op : 'infixop6) (e1 : 'expr)
                                 (_loc : Gram.Loc.t) ->
-                                (Ast.ExApp (_loc, (Ast.ExApp (_loc, op, e1)),
+                                  (Ast.ExApp (_loc, (Ast.ExApp (_loc, op, e1)),
                                    e2) :
                                   'expr)))) ]);
                       ((Some "&&"), (Some Camlp4.Sig.Grammar.RightA),
           and _ = (stream_end : 'stream_end Gram.Entry.t)
           and _ = (stream_begin : 'stream_begin Gram.Entry.t)
           and _ = (stream_expr : 'stream_expr Gram.Entry.t) in
-          let grammar_entry_create = Gram.Entry.mk in
+          let! grammar_entry_create = Gram.Entry.mk in
           let stream_patt : 'stream_patt Gram.Entry.t =
             grammar_entry_create "stream_patt"
           and stream_expr_comp : 'stream_expr_comp Gram.Entry.t =
         let _ =
           let _ = (expr : 'expr Gram.Entry.t)
           and _ = (symbol : 'symbol Gram.Entry.t) in
-          let grammar_entry_create = Gram.Entry.mk in
+          let! grammar_entry_create = Gram.Entry.mk in
           let extend_header : 'extend_header Gram.Entry.t =
             grammar_entry_create "extend_header"
           and semi_sep : 'semi_sep Gram.Entry.t =
           and _ = (sig_item : 'sig_item Gram.Entry.t)
           and _ = (str_item : 'str_item Gram.Entry.t)
           and _ = (patt : 'patt Gram.Entry.t) in
-          let grammar_entry_create = Gram.Entry.mk in
+          let! grammar_entry_create = Gram.Entry.mk in
           let macro_def : 'macro_def Gram.Entry.t =
             grammar_entry_create "macro_def"
           and uident : 'uident Gram.Entry.t = grammar_entry_create "uident"
           
         let _ =
           let _ = (expr : 'expr Gram.Entry.t) in
-          let grammar_entry_create = Gram.Entry.mk in
+          let! grammar_entry_create = Gram.Entry.mk in
           let end_or_in : 'end_or_in Gram.Entry.t =
             grammar_entry_create "end_or_in"
           and start_debug : 'start_debug Gram.Entry.t =
           and _ =
             (comprehension_or_sem_expr_for_list :
               'comprehension_or_sem_expr_for_list Gram.Entry.t) in
-          let grammar_entry_create = Gram.Entry.mk in
+          let! grammar_entry_create = Gram.Entry.mk in
           let item : 'item Gram.Entry.t = grammar_entry_create "item"
           in
             (Gram.extend (expr : 'expr Gram.Entry.t)

ocamlbuild/command.ml

   | xs -> S xs
 
 let digest =
-  let list = List.fold_right in
+  let! list = List.fold_right in
   let text x acc = Digest.string x :: acc in
   let rec cmd =
     function

ocamlbuild/hygiene.ml

             let oc = open_out_gen [Open_wronly; Open_creat; Open_trunc; Open_binary] 0o777 fn in
             (* See PR #5338: under mingw, one produces a shell script, which must follow
                Unix eol convention; hence Open_binary. *)
-            let fp = Printf.fprintf in
+            let! fp = Printf.fprintf in
             fp oc "#!/bin/sh\n\
                    # File generated by ocamlbuild\n\
                    \n\

ocamlbuild/main.ml

 let show_documentation () =
   let rules = Rule.get_rules () in
   let flags = Flags.get_flags () in
-  let pp fmt = Log.raw_dprintf (-1) fmt in
+  let! pp fmt = Log.raw_dprintf (-1) fmt in
   List.iter begin fun rule ->
     pp "%a@\n@\n" (Rule.pretty_print Resource.print_pattern) rule
   end rules;

ocamlbuild/rule.ml

   (fun () -> rules := [])
 
 let rule name ?(tags=[]) ?(prods=[]) ?(deps=[]) ?prod ?dep ?stamp ?(insert = `bottom) code =
-  let res_add import xs xopt =
+  let! res_add import xs xopt =
     let init =
       match xopt with
       | None -> []

ocamldoc/odoc_html.ml

       bs b "</table>\n"
 
     method html_of_Index_list b =
-      let index_if_not_empty l url m =
+      let! index_if_not_empty l url m =
         match l with
           [] -> ()
         | _ -> bp b "<li><a href=\"%s\">%s</a></li>\n" url m
     (** A function to build the header of pages. *)
     method prepare_header module_list =
       let f b ?(nav=None) ?(comments=[]) t  =
-        let link_if_not_empty l m url =
+        let! link_if_not_empty l m url =
           match l with
             [] -> ()
           | _ ->

ocamldoc/odoc_info.ml

 
 let info_string_of_info i =
   let b = Buffer.create 256 in
-  let p = Printf.bprintf in
+  let! p = Printf.bprintf in
   (
    match i.i_desc with
      None -> ()

typing/typecore.ml

 
   let ty_arrow gty ty = newty (Tarrow ("", instance_def gty, ty, Cok)) in
 
-  let bad_conversion fmt i c =
+  let! bad_conversion fmt i c =
     raise (Error (loc, Bad_conversion (fmt, i, c))) in
-  let incomplete_format fmt =
+  let! incomplete_format fmt =
     raise (Error (loc, Incomplete_format fmt)) in
 
   let rec type_in_format fmt =
 
 (* Typing of let bindings *)
 
-and type_let ?(polymorphism=true)
+and type_let ?(polymorphism=false)
              ?(check = fun s -> Warnings.Unused_var s)
              ?(check_strict = fun s -> Warnings.Unused_var_strict s)
     env rec_flag spat_sexp_list scope allow =
- let polymorphism = true in
   begin_def();
   if !Clflags.principal then begin_def ();
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.