src/Pure/General/source.ML
changeset 23139 aa899bce7c3b
parent 20739 8df08902da6f
child 23661 b3f05bc680b6
--- a/src/Pure/General/source.ML	Wed May 30 23:32:54 2007 +0200
+++ b/src/Pure/General/source.ML	Thu May 31 01:25:24 2007 +0200
@@ -124,7 +124,9 @@
     else
       (TextIO.output (outstream, prompt);
         TextIO.flushOut outstream;
-        (input @ explode (TextIO.inputLine instream), ()))
+        (case TextIO.inputLine instream of
+          SOME line => (input @ explode line, ())
+        | NONE => (input, ())))
   end;
 
 fun of_stream instream outstream =