replaced wakeup by decorate_prompt_fn;
authorwenzelm
Sun, 29 Nov 1998 13:15:50 +0100
changeset 5988 1a2285f3db47
parent 5987 389d03e6e093
child 5989 9670dae0143d
replaced wakeup by decorate_prompt_fn;
src/Pure/Syntax/source.ML
--- a/src/Pure/Syntax/source.ML	Sun Nov 29 13:15:17 1998 +0100
+++ b/src/Pure/Syntax/source.ML	Sun Nov 29 13:15:50 1998 +0100
@@ -18,7 +18,7 @@
   val of_list: 'a list -> ('a, 'a list) source
   val of_string: string -> (string, string list) source
   val of_file: string -> (string, string list) source
-  val wakeup: string ref
+  val decorate_prompt_fn: (string -> string) ref
   val of_stream: TextIO.instream -> TextIO.outstream -> (string, unit) source
   val tty: (string, unit) source
   val source': 'a -> 'b * ('b -> bool) -> ('a * 'b list -> 'c list * ('a * 'b list)) ->
@@ -113,10 +113,10 @@
 
 (* stream source *)
 
-val wakeup = ref "";
+val decorate_prompt_fn = ref (fn s:string => s);
 
 fun drain_stream instream outstream prompt () =
-  (TextIO.output (outstream, ! wakeup ^ prompt);
+  (TextIO.output (outstream, ! decorate_prompt_fn prompt);
     TextIO.flushOut outstream;
     (explode (TextIO.inputLine instream), ()));