src/Pure/pure_thy.ML
changeset 24137 8d7896398147
parent 24029 9221b600dbb2
child 24243 08db58fd6374
equal deleted inserted replaced
24136:0c6c943d8f1e 24137:8d7896398147
   236 
   236 
   237 (*beware of proper order of evaluation!*)
   237 (*beware of proper order of evaluation!*)
   238 
   238 
   239 fun lookup_thms thy =
   239 fun lookup_thms thy =
   240   let
   240   let
   241     val thy_ref = Theory.self_ref thy;
       
   242     val (space, thms) = #theorems (get_theorems thy);
   241     val (space, thms) = #theorems (get_theorems thy);
       
   242     val thy_ref = Theory.check_thy thy;
   243   in
   243   in
   244     fn name =>
   244     fn name =>
   245       Option.map (map (Thm.transfer (Theory.deref thy_ref)))     (*dynamic identity*)
   245       Option.map (map (Thm.transfer (Theory.deref thy_ref)))     (*dynamic identity*)
   246       (Symtab.lookup thms (NameSpace.intern space name)) (*static content*)
   246       (Symtab.lookup thms (NameSpace.intern space name)) (*static content*)
   247   end;
   247   end;