src/Pure/library.ML
changeset 205 0dd3a0a264cd
parent 172 3224c46737ef
child 233 efd6b4bb14dd
equal deleted inserted replaced
204:b9f087b42a44 205:0dd3a0a264cd
   214 fun prs s = output(std_out,s);
   214 fun prs s = output(std_out,s);
   215 fun writeln s = prs (s ^ "\n");
   215 fun writeln s = prs (s ^ "\n");
   216 
   216 
   217 (*Print error message and abort to top level*)
   217 (*Print error message and abort to top level*)
   218 exception ERROR;
   218 exception ERROR;
   219 fun error (msg) = (writeln msg;  raise ERROR);
   219 fun error msg = (writeln msg; raise ERROR);
       
   220 fun sys_error msg = (writeln "-- System Error --"; error msg);
   220 
   221 
   221 fun assert p msg = if p then () else error msg;
   222 fun assert p msg = if p then () else error msg;
   222 fun deny p msg = if p then error msg else ();
   223 fun deny p msg = if p then error msg else ();
   223 
   224 
   224 (*For the "test" target in Makefiles -- signifies successful termination*)
   225 (*For the "test" target in Makefiles -- signifies successful termination*)