on master help sign in
Make sure evaled code is reflected in the compiler env later on
commitc01784afe5f8f953eb96bf50d81dcca14f0affd2 authorPatrick Stapfer <ryyppy@users.noreply.github.com> dateFri 8 Mar 2019, 14:28 (8 years ago) parent5041dd5
1 file changed+6−4
languages/ocaml/repl.ml+6−4
languages/ocaml/repl.ml+6−4
@@ -114,10 +114,6 @@ let _ =
114114 use_silently ppf explicit_name
115115
116116 let loop ppf =
117− (* If there's an entry file provided, run it before dropping into interactive mode *)
118− (match !eval_filepath with
119− | Some name -> run_script ppf name
120− | _ -> false) |> ignore ;
121117 Clflags.debug := true ;
122118 Location.formatter_for_warnings := ppf ;
123119 ( try initialize_toplevel_env () with
@@ -130,6 +126,12 @@ let _ =
130126 Location.input_lexbuf := Some lb ;
131127 Sys.catch_break true ;
132128 (*load_ocamlinit ppf;*)
129+
130+ (* If there's an entry file provided, run it before dropping into interactive mode *)
131+ (match !eval_filepath with
132+ | Some name -> run_script ppf name
133+ | _ -> false) |> ignore ;
134+
133135 while true do
134136 let snap = Btype.snapshot () in
135137 try