author | wenzelm |
Sat, 15 Apr 2023 14:14:30 +0200 | |
changeset 77855 | ff801186ff66 |
parent 77614 | b619d80f61fa |
child 78012 | 61c92140a6d2 |
permissions | -rw-r--r-- |
57647 | 1 |
/* Title: Pure/ROOT.scala |
42720
caa4f1279154
added toplevel isabelle package -- reduce warnings with scala-2.9.0.final;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
caa4f1279154
added toplevel isabelle package -- reduce warnings with scala-2.9.0.final;
wenzelm
parents:
diff
changeset
|
3 |
|
57647 | 4 |
Root of isabelle package. |
42720
caa4f1279154
added toplevel isabelle package -- reduce warnings with scala-2.9.0.final;
wenzelm
parents:
diff
changeset
|
5 |
*/ |
caa4f1279154
added toplevel isabelle package -- reduce warnings with scala-2.9.0.final;
wenzelm
parents:
diff
changeset
|
6 |
|
75393 | 7 |
package object isabelle { |
62492 | 8 |
val ERROR = Exn.ERROR |
9 |
val error = Exn.error _ |
|
68131 | 10 |
def cat_error(msgs: String*): Nothing = Exn.cat_error(msgs:_*) |
62492 | 11 |
|
77515 | 12 |
def using[A <: AutoCloseable, B](a: A)(f: A => B): B = |
13 |
Library.using(a)(f) |
|
14 |
def using_option[A <: AutoCloseable, B](opt: Option[A])(f: A => B): Option[B] = |
|
15 |
Library.using_option(opt)(f) |
|
16 |
||
62492 | 17 |
val space_explode = Library.space_explode _ |
18 |
val split_lines = Library.split_lines _ |
|
19 |
val cat_lines = Library.cat_lines _ |
|
64173 | 20 |
val terminate_lines = Library.terminate_lines _ |
62492 | 21 |
val quote = Library.quote _ |
22 |
val commas = Library.commas _ |
|
23 |
val commas_quote = Library.commas_quote _ |
|
75295
38398766be6b
command-line arguments for "isabelle vscode", similar to "isabelle jedit";
wenzelm
parents:
74356
diff
changeset
|
24 |
val proper_bool = Library.proper_bool _ |
65712 | 25 |
val proper_string = Library.proper_string _ |
65761 | 26 |
def proper_list[A](list: List[A]): Option[List[A]] = Library.proper_list(list) |
77367 | 27 |
def if_proper[A](x: Iterable[A], body: => String): String = Library.if_proper(x, body) |
77614 | 28 |
def if_proper(b: Boolean, body: => String): String = Library.if_proper(b, body) |
42720
caa4f1279154
added toplevel isabelle package -- reduce warnings with scala-2.9.0.final;
wenzelm
parents:
diff
changeset
|
29 |
} |