equal
deleted
inserted
replaced
336 errors match { |
336 errors match { |
337 case Nil => this |
337 case Nil => this |
338 case errs => error(cat_lines(errs)) |
338 case errs => error(cat_lines(errs)) |
339 } |
339 } |
340 |
340 |
341 lazy val theory_graph: Document.Theory_Graph[A] = |
341 lazy val theory_graph: Document.Theory_Graph[Unit] = |
342 Document.theory_graph(entries.map(entry => |
342 { |
343 ((entry.name, seen(entry.name)), entry.header.imports))) |
343 val regular = theories.toSet |
|
344 val irregular = |
|
345 (for { |
|
346 entry <- entries.iterator |
|
347 imp <- entry.header.imports |
|
348 if !regular(imp) |
|
349 } yield imp).toSet |
|
350 |
|
351 Document.theory_graph( |
|
352 irregular.toList.map(name => ((name, ()), Nil)) ::: |
|
353 entries.map(entry => ((entry.name, ()), entry.header.imports))) |
|
354 } |
344 |
355 |
345 lazy val loaded_theories: Graph[String, Outer_Syntax] = |
356 lazy val loaded_theories: Graph[String, Outer_Syntax] = |
346 (session_base.loaded_theories /: entries)({ case (graph, entry) => |
357 (session_base.loaded_theories /: entries)({ case (graph, entry) => |
347 val name = entry.name.theory |
358 val name = entry.name.theory |
348 val imports = entry.header.imports.map(_.theory) |
359 val imports = entry.header.imports.map(_.theory) |