--- a/src/Pure/Thy/file_format.scala Tue Apr 07 22:13:22 2020 +0200
+++ b/src/Pure/Thy/file_format.scala Wed Apr 08 13:14:05 2020 +0200
@@ -12,12 +12,12 @@
sealed case class Theory_Context(name: Document.Node.Name, content: String)
- /* environment */
+ /* registry */
- def environment(): Environment =
- new Environment(Isabelle_System.init_classes[File_Format]("ISABELLE_FILE_FORMATS"))
+ lazy val registry: Registry =
+ new Registry(Isabelle_System.services.collect { case c: File_Format => c })
- final class Environment private [File_Format](file_formats: List[File_Format])
+ final class Registry private [File_Format](file_formats: List[File_Format])
{
override def toString: String = file_formats.mkString("File_Format.Environment(", ",", ")")
@@ -53,7 +53,7 @@
object No_Agent extends Agent
}
-trait File_Format
+trait File_Format extends Isabelle_System.Service
{
def format_name: String
override def toString: String = format_name