149 master_dir: Path.T, |
150 master_dir: Path.T, |
150 theories: (Options.T * (string * Position.T) list) list, |
151 theories: (Options.T * (string * Position.T) list) list, |
151 sessions: string list, |
152 sessions: string list, |
152 global_theories: (string * string) list, |
153 global_theories: (string * string) list, |
153 loaded_theories: string list, |
154 loaded_theories: string list, |
154 known_theories: (string * string) list}; |
155 known_theories: (string * string) list, |
|
156 bibtex_entries: string list}; |
155 |
157 |
156 fun decode_args yxml = |
158 fun decode_args yxml = |
157 let |
159 let |
158 open XML.Decode; |
160 open XML.Decode; |
159 val position = Position.of_properties o properties; |
161 val position = Position.of_properties o properties; |
160 val (symbol_codes, (command_timings, (do_output, (verbose, (browser_info, |
162 val (symbol_codes, (command_timings, (do_output, (verbose, (browser_info, |
161 (document_files, (graph_file, (parent_name, (chapter, (name, (master_dir, |
163 (document_files, (graph_file, (parent_name, (chapter, (name, (master_dir, |
162 (theories, (sessions, (global_theories, (loaded_theories, known_theories))))))))))))))) = |
164 (theories, (sessions, (global_theories, (loaded_theories, |
|
165 (known_theories, bibtex_entries)))))))))))))))) = |
163 pair (list (pair string int)) (pair (list properties) (pair bool (pair bool (pair string |
166 pair (list (pair string int)) (pair (list properties) (pair bool (pair bool (pair string |
164 (pair (list (pair string string)) (pair string (pair string (pair string (pair string |
167 (pair (list (pair string string)) (pair string (pair string (pair string (pair string |
165 (pair string |
168 (pair string |
166 (pair (((list (pair Options.decode (list (pair string position)))))) |
169 (pair (((list (pair Options.decode (list (pair string position)))))) |
167 (pair (list string) (pair (list (pair string string)) |
170 (pair (list string) (pair (list (pair string string)) (pair (list string) |
168 (pair (list string) (list (pair string string)))))))))))))))) |
171 (pair (list (pair string string)) (list string)))))))))))))))) |
169 (YXML.parse_body yxml); |
172 (YXML.parse_body yxml); |
170 in |
173 in |
171 Args {symbol_codes = symbol_codes, command_timings = command_timings, do_output = do_output, |
174 Args {symbol_codes = symbol_codes, command_timings = command_timings, do_output = do_output, |
172 verbose = verbose, browser_info = Path.explode browser_info, |
175 verbose = verbose, browser_info = Path.explode browser_info, |
173 document_files = map (apply2 Path.explode) document_files, |
176 document_files = map (apply2 Path.explode) document_files, |
174 graph_file = Path.explode graph_file, parent_name = parent_name, chapter = chapter, |
177 graph_file = Path.explode graph_file, parent_name = parent_name, chapter = chapter, |
175 name = name, master_dir = Path.explode master_dir, theories = theories, sessions = sessions, |
178 name = name, master_dir = Path.explode master_dir, theories = theories, sessions = sessions, |
176 global_theories = global_theories, loaded_theories = loaded_theories, |
179 global_theories = global_theories, loaded_theories = loaded_theories, |
177 known_theories = known_theories} |
180 known_theories = known_theories, bibtex_entries = bibtex_entries} |
178 end; |
181 end; |
179 |
182 |
180 fun build_session (Args {symbol_codes, command_timings, do_output, verbose, browser_info, |
183 fun build_session (Args {symbol_codes, command_timings, do_output, verbose, browser_info, |
181 document_files, graph_file, parent_name, chapter, name, master_dir, theories, sessions, |
184 document_files, graph_file, parent_name, chapter, name, master_dir, theories, sessions, |
182 global_theories, loaded_theories, known_theories}) = |
185 global_theories, loaded_theories, known_theories, bibtex_entries}) = |
183 let |
186 let |
184 val symbols = HTML.make_symbols symbol_codes; |
187 val symbols = HTML.make_symbols symbol_codes; |
185 |
188 |
186 val _ = |
189 val _ = |
187 Resources.init_session_base |
190 Resources.init_session_base |