--- a/src/Pure/ML/ml_context.ML Tue Aug 31 16:07:30 2010 +0200
+++ b/src/Pure/ML/ml_context.ML Tue Aug 31 16:23:58 2010 +0200
@@ -35,8 +35,8 @@
val eval_text_in: Proof.context option -> bool -> Position.T -> Symbol_Pos.text -> unit
val expression: Position.T -> string -> string -> ML_Lex.token Antiquote.antiquote list ->
Context.generic -> Context.generic
- val evaluate:
- Proof.context -> bool -> string * (unit -> 'a) option Unsynchronized.ref -> string -> 'a
+ val evaluate: Proof.context -> bool ->
+ string * (unit -> 'a) option Unsynchronized.ref -> string * string -> 'a
end
structure ML_Context: ML_CONTEXT =
@@ -203,10 +203,10 @@
(* FIXME not thread-safe -- reference can be accessed directly *)
-fun evaluate ctxt verbose (ref_name, r) txt = NAMED_CRITICAL "ML" (fn () =>
+fun evaluate ctxt verbose (ref_name, r) (prelude, txt) = NAMED_CRITICAL "ML" (fn () =>
let
- val ants =
- ML_Lex.read Position.none ("val _ = (" ^ ref_name ^ " := SOME (fn () => " ^ txt ^ "))");
+ val s = prelude ^ "val _ = (" ^ ref_name ^ " := SOME (fn () => " ^ txt ^ "))"
+ val ants = ML_Lex.read Position.none s;
val _ = r := NONE;
val _ =
Context.setmp_thread_data (SOME (Context.Proof ctxt))