Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

toplevel: fix the toplevel script (Core API change)

  • Loading branch information...
commit fadd96326e71d682f53c8075f75e20d6ca0a215c 1 parent ba1e45a
@smondet smondet authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 toplevel.ml
View
6 toplevel.ml
@@ -24,8 +24,8 @@ let () =
exit 1
);
let tmp = Filename.temp_file "ocamlinit" ".ml" in
- let o = open_out tmp in
- fprintf o "
+ Out_channel.with_file tmp ~f:(fun o ->
+ fprintf o "
#use \"topfind\";;
#thread;;
#require \"core, zip, sqlite3, unix, batteries, xmlm, pcre\"
@@ -33,6 +33,6 @@ let () =
#load \"biocaml.cma\";;
open Core.Std;;
" biocaml_dir;
- close_out o;
+ );
command "ocaml -init %s" tmp;
Sys.remove tmp
Please sign in to comment.
Something went wrong with that request. Please try again.