src/Pure/Thy/thy_info.ML
changeset 9451 5c25ed3c10a0
parent 9417 c4f7c959eaee
child 9490 c2606af9922c
equal deleted inserted replaced
9450:c97dba47e504 9451:5c25ed3c10a0
   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;