src/Pure/Thy/thy_info.ML
changeset 4964 bbe9065edf8a
parent 4111 93baba60ece2
child 4975 20b89fcd90a7
equal deleted inserted replaced
4963:38aa2d56e28c 4964:bbe9065edf8a
    30 
    30 
    31 signature THY_INFO =
    31 signature THY_INFO =
    32 sig
    32 sig
    33   val loaded_thys: thy_info Symtab.table ref
    33   val loaded_thys: thy_info Symtab.table ref
    34   val get_thyinfo: string -> thy_info option
    34   val get_thyinfo: string -> thy_info option
    35   val store_theory: theory * string -> unit
    35   val store_theory: theory -> unit
    36   val path_of: string -> string
    36   val path_of: string -> string
    37   val children_of: string -> string list
    37   val children_of: string -> string list
    38   val parents_of_name: string -> string list
    38   val parents_of_name: string -> string list
    39   val thyinfo_of_sign: Sign.sg -> string * thy_info
    39   val thyinfo_of_sign: Sign.sg -> string * thy_info
    40   val theory_of: string -> theory
    40   val theory_of: string -> theory
   109   | _ => err_not_stored name);
   109   | _ => err_not_stored name);
   110 
   110 
   111 
   111 
   112 (* store_theory *)
   112 (* store_theory *)
   113 
   113 
   114 fun store_theory (thy, name) =
   114 fun store_theory thy =
   115   let
   115   let
       
   116     val name = PureThy.get_name thy;
   116     val {path, children, parents, thy_time, ml_time, theory = _} =
   117     val {path, children, parents, thy_time, ml_time, theory = _} =
   117       the_thyinfo name;
   118       the_thyinfo name;
   118     val info = {path = path, children = children, parents = parents,
   119     val info = {path = path, children = children, parents = parents,
   119       thy_time = thy_time, ml_time = ml_time, theory = Some thy};
   120       thy_time = thy_time, ml_time = ml_time, theory = Some thy};
   120   in
   121   in