src/Pure/Thy/thy_info.ML
changeset 70711 91319c3d2841
parent 70015 c8e08d8ffb93
child 70991 f9f7c34b7dd4
equal deleted inserted replaced
70710:3f557ed88fd6 70711:91319c3d2841
   368     fun commit () = update_thy deps theory;
   368     fun commit () = update_thy deps theory;
   369   in
   369   in
   370     Result {theory = theory, exec_id = exec_id, present = present, commit = commit, weight = weight}
   370     Result {theory = theory, exec_id = exec_id, present = present, commit = commit, weight = weight}
   371   end;
   371   end;
   372 
   372 
   373 fun check_deps dir name =
   373 fun check_thy_deps dir name =
   374   (case lookup_deps name of
   374   (case lookup_deps name of
   375     SOME NONE => (true, NONE, Position.none, get_imports name, [])
   375     SOME NONE => (true, NONE, Position.none, get_imports name, [])
   376   | NONE =>
   376   | NONE =>
   377       let val {master, text, theory_pos, imports, keywords} = Resources.check_thy dir name
   377       let val {master, text, theory_pos, imports, keywords} = Resources.check_thy dir name
   378       in (false, SOME (make_deps master imports, text), theory_pos, imports, keywords) end
   378       in (false, SOME (make_deps master imports, text), theory_pos, imports, keywords) end
   400       SOME task => (task_finished task, tasks)
   400       SOME task => (task_finished task, tasks)
   401     | NONE =>
   401     | NONE =>
   402         let
   402         let
   403           val _ = member (op =) initiators theory_name andalso error (cycle_msg initiators);
   403           val _ = member (op =) initiators theory_name andalso error (cycle_msg initiators);
   404 
   404 
   405           val (current, deps, theory_pos, imports, keywords) = check_deps master_dir theory_name
   405           val (current, deps, theory_pos, imports, keywords) = check_thy_deps master_dir theory_name
   406             handle ERROR msg =>
   406             handle ERROR msg =>
   407               cat_error msg
   407               cat_error msg
   408                 ("The error(s) above occurred for theory " ^ quote theory_name ^
   408                 ("The error(s) above occurred for theory " ^ quote theory_name ^
   409                   Position.here require_pos ^ required_by "\n" initiators);
   409                   Position.here require_pos ^ required_by "\n" initiators);
   410 
   410