camlspotter avatar camlspotter committed 34f51b9

command

Comments (0)

Files changed (1)

   let path = 
     match 
       imp_ None & fun ocamlfind_path ->
-        ignore & shell_command "ocamlfind printconf destdir" & function
+        ignore & shell_command "ocamlfind printconf destdir" ~f: (function
           | (`Out, `Read line) ->
               begin match !ocamlfind_path with
               | Some _ -> failwith "ocamlfind printconf destdir prints more than one line"
               | None -> ocamlfind_path := Some (String.chop_newline line)
               end
-          | _ -> ()
+          | _ -> ())
     with
     | None -> failwith "No ocamlfind installtion path found. Check your ocamlfind."
     | Some p -> p
   let dest_dir package = 
     match 
       imp_ None & fun result ->
-        ignore & shell_command (sprintf "ocamlfind query %s" package) & function
+        ignore & shell_command (sprintf "ocamlfind query %s" package) ~f:(function
           | (`Out, `Read line) ->
               begin match !result with
               | Some _ -> failwith "ocamlfind query package prints more than one line"
               | None -> result := Some (String.chop_newline line)
               end
-          | _ -> ()
+          | _ -> ())
     with
     | None -> failwithf "No ocamlfind installtion path for package \"%s\" found. Check your ocamlfind." package
     | Some p -> p
     StringSet.to_list
     & imp_ StringSet.empty 
     & fun packs ->
-      ignore & shell_command "ocamlfind list" (function
+      ignore & shell_command "ocamlfind list" ~f:(function
         | (`Err, `Read s) -> prerr_endline s
         | (`Out, `Read s) ->
             begin 
   let where = 
     match 
       imp_ None & fun ocaml_where ->
-        ignore & shell_command "ocamlc -where" & function
+        ignore & shell_command "ocamlc -where" ~f:(function
           | (`Out, `Read line) ->
               begin match !ocaml_where with
               | Some _ -> failwith "ocamlc -where prints more than one line"
               | None -> ocaml_where := Some (String.chop_newline line)
               end
-          | _ -> ()
+          | _ -> ())
     with
     | None -> failwith "ocamlc -where failed."
     | Some p -> p
                 (* The file is installed! If there is .spot/.spit, copy it! *)
                 let dirname = Filename.dirname p in
                 match 
-                  command ["cp"; spotspit; dirname] (function
+                  command ["cp"; spotspit; dirname] ~f:(function
                     | (`Err, `Read mes) -> eprintf "Failed to copy %s to %s: %s\n%!" spotspit dirname mes
                     | _ -> ())
                 with
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.