| author | fleury |
| Mon, 16 Jun 2014 16:18:34 +0200 | |
| changeset 57256 | cf43583f9bb9 |
| parent 56831 | e3ccf0809d51 |
| child 57453 | 77d13a98f1c8 |
| permissions | -rw-r--r-- |
|
56782
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
1 |
/* Title: Pure/General/output.ML |
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
3 |
|
|
56830
e760242101fc
tuned signature -- channels for diagnostic output for system tools means stderr;
wenzelm
parents:
56782
diff
changeset
|
4 |
Isabelle channels for diagnostic output. |
|
56782
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
5 |
*/ |
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
6 |
|
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
7 |
package isabelle |
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
8 |
|
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
9 |
|
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
10 |
object Output |
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
11 |
{
|
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
12 |
def warning_text(msg: String): String = cat_lines(split_lines(msg).map("### " + _))
|
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
13 |
def error_text(msg: String): String = cat_lines(split_lines(msg).map("*** " + _))
|
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
14 |
|
|
56831
e3ccf0809d51
prefer scala.Console with its support for thread-local redirection;
wenzelm
parents:
56830
diff
changeset
|
15 |
def writeln(msg: String) { Console.err.println(msg) }
|
|
e3ccf0809d51
prefer scala.Console with its support for thread-local redirection;
wenzelm
parents:
56830
diff
changeset
|
16 |
def warning(msg: String) { Console.err.println(warning_text(msg)) }
|
|
e3ccf0809d51
prefer scala.Console with its support for thread-local redirection;
wenzelm
parents:
56830
diff
changeset
|
17 |
def error_message(msg: String) { Console.err.println(error_text(msg)) }
|
|
56782
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
18 |
} |
|
433cf57550fa
more systematic Isabelle output, like in classic Isabelle/ML (without markup);
wenzelm
parents:
diff
changeset
|
19 |