hehe it's all inside the toplevel now
This commit is contained in:
@ -44,6 +44,8 @@ let toplevel_value_bindings : Obj.t String.Map.t ref = ref String.Map.empty
|
||||
|
||||
let ppf = ref Format.std_formatter
|
||||
|
||||
let eval = ref None
|
||||
|
||||
let getvalue name =
|
||||
try String.Map.find name !toplevel_value_bindings
|
||||
with Not_found -> fatal_error (name ^ " unbound at toplevel")
|
||||
@ -2328,7 +2330,7 @@ end
|
||||
|
||||
type evalenv = Format.formatter -> string -> unit
|
||||
|
||||
let eval lb ppf (text : string) =
|
||||
let eval_fun lb ppf (text : string) =
|
||||
Topdirs.std_out := ppf;
|
||||
(read_interactive_input :=
|
||||
fun buffer _ ->
|
||||
@ -2408,4 +2410,5 @@ let init ppf =
|
||||
Location.input_phrase_buffer := Some phrase_buffer;
|
||||
Sys.catch_break true;
|
||||
run_hooks After_setup;
|
||||
eval lb
|
||||
eval := Some (eval_fun lb);
|
||||
eval_fun lb
|
||||
|
||||
Reference in New Issue
Block a user