equal
deleted
inserted
replaced
88 |
88 |
89 /* command line entry point */ |
89 /* command line entry point */ |
90 |
90 |
91 def main(args: Array[String]) |
91 def main(args: Array[String]) |
92 { |
92 { |
93 Command_Line.tool { |
93 Command_Line.tool0 { |
94 val entries = contents() |
94 val entries = contents() |
95 if (args.isEmpty) Console.println(cat_lines(contents_lines().map(_._2))) |
95 if (args.isEmpty) Console.println(cat_lines(contents_lines().map(_._2))) |
96 else { |
96 else { |
97 args.foreach(arg => |
97 args.foreach(arg => |
98 entries.collectFirst { case Doc(name, _, path) if arg == name => path } match { |
98 entries.collectFirst { case Doc(name, _, path) if arg == name => path } match { |
99 case Some(path) => view(path) |
99 case Some(path) => view(path) |
100 case None => error("No Isabelle documentation entry: " + quote(arg)) |
100 case None => error("No Isabelle documentation entry: " + quote(arg)) |
101 } |
101 } |
102 ) |
102 ) |
103 } |
103 } |
104 0 |
|
105 } |
104 } |
106 } |
105 } |
107 } |
106 } |
108 |
107 |