equal
deleted
inserted
replaced
381 val _ = (map Path.basic parents; seq assert_thy parents); |
381 val _ = (map Path.basic parents; seq assert_thy parents); |
382 val theory = PureThy.begin_theory name (map get_theory parents); |
382 val theory = PureThy.begin_theory name (map get_theory parents); |
383 val deps = |
383 val deps = |
384 if known_thy name then get_deps name |
384 if known_thy name then get_deps name |
385 else (init_deps None (map #1 paths)); (*records additional ML files only!*) |
385 else (init_deps None (map #1 paths)); (*records additional ML files only!*) |
386 val _ = change_thys (update_node name parents (deps, Some theory)); |
|
387 val use_paths = mapfilter (fn (x, true) => Some x | _ => None) paths; |
386 val use_paths = mapfilter (fn (x, true) => Some x | _ => None) paths; |
|
387 |
|
388 val _ = change_thys (update_node name parents (deps, Some (Theory.copy theory))); |
388 val theory' = theory |> present name parents paths; |
389 val theory' = theory |> present name parents paths; |
|
390 val _ = put_theory name (Theory.copy theory'); |
389 val ((), theory'') = Context.pass_theory theory' (seq (load_file false)) use_paths; |
391 val ((), theory'') = Context.pass_theory theory' (seq (load_file false)) use_paths; |
|
392 val _ = put_theory name (Theory.copy theory''); |
390 in theory'' end; |
393 in theory'' end; |
391 |
394 |
392 fun end_theory theory = |
395 fun end_theory theory = |
393 let |
396 let |
394 val theory' = PureThy.end_theory theory; |
397 val theory' = PureThy.end_theory theory; |