Exn.is_interrupt: include interrupts that have passed through the IO layer;
authorwenzelm
Thu, 09 Sep 2010 17:38:45 +0200
changeset 39233 9a0c67d4517a
parent 39232 69c6d3e87660
child 39234 d76a2fd129b5
Exn.is_interrupt: include interrupts that have passed through the IO layer;
src/Pure/General/exn.ML
src/Pure/ML-Systems/smlnj.ML
--- a/src/Pure/General/exn.ML	Thu Sep 09 17:20:27 2010 +0200
+++ b/src/Pure/General/exn.ML	Thu Sep 09 17:38:45 2010 +0200
@@ -51,6 +51,7 @@
 fun interrupt () = raise Interrupt;
 
 fun is_interrupt Interrupt = true
+  | is_interrupt (IO.Io {cause = Interrupt, ...}) = true
   | is_interrupt _ = false;
 
 val interrupt_exn = Exn Interrupt;
--- a/src/Pure/ML-Systems/smlnj.ML	Thu Sep 09 17:20:27 2010 +0200
+++ b/src/Pure/ML-Systems/smlnj.ML	Thu Sep 09 17:38:45 2010 +0200
@@ -159,16 +159,6 @@
 end;
 
 
-(* basis library fixes *)
-
-structure TextIO =
-struct
-  open TextIO;
-  fun inputLine is = TextIO.inputLine is
-    handle IO.Io _ => Exn.interrupt ();
-end;
-
-
 
 (** OS related **)