288 def apply(name: String): Info = imports_graph.get_node(name) |
288 def apply(name: String): Info = imports_graph.get_node(name) |
289 def get(name: String): Option[Info] = |
289 def get(name: String): Option[Info] = |
290 if (imports_graph.defined(name)) Some(imports_graph.get_node(name)) else None |
290 if (imports_graph.defined(name)) Some(imports_graph.get_node(name)) else None |
291 |
291 |
292 def global_theories: Set[String] = |
292 def global_theories: Set[String] = |
293 (for { |
293 (Set.empty[String] /: |
294 (_, (info, _)) <- imports_graph.iterator |
294 (for { |
295 name <- info.global_theories.iterator } |
295 (_, (info, _)) <- imports_graph.iterator |
296 yield name).toSet |
296 thy <- info.global_theories.iterator } |
|
297 yield (thy, info.pos)))( |
|
298 { case (set, (thy, pos)) => |
|
299 if (set.contains(thy)) |
|
300 error("Duplicate declaration of global theory " + quote(thy) + Position.here(pos)) |
|
301 else set + thy |
|
302 }) |
297 |
303 |
298 def selection(select: Selection): (List[String], T) = |
304 def selection(select: Selection): (List[String], T) = |
299 { |
305 { |
300 val (_, build_graph1) = select(build_graph) |
306 val (_, build_graph1) = select(build_graph) |
301 val (selected, imports_graph1) = select(imports_graph) |
307 val (selected, imports_graph1) = select(imports_graph) |