src/Pure/theory.ML
changeset 16803 014090d1e64b
parent 16743 21dbff595bf6
child 16883 a89fafe1cbd8
equal deleted inserted replaced
16802:6eeee59dac4c 16803:014090d1e64b
   177 val oracle_space = #1 o #oracles o rep_theory;
   177 val oracle_space = #1 o #oracles o rep_theory;
   178 
   178 
   179 val axioms_of = Symtab.dest o #2 o #axioms o rep_theory;
   179 val axioms_of = Symtab.dest o #2 o #axioms o rep_theory;
   180 fun all_axioms_of thy = List.concat (map axioms_of (thy :: ancestors_of thy));
   180 fun all_axioms_of thy = List.concat (map axioms_of (thy :: ancestors_of thy));
   181 
   181 
   182 fun defs_of thy = (case rep_theory thy of {defs=D, ...} => D)
   182 val defs_of = #defs o rep_theory;
   183 
   183 
   184 fun requires thy name what =
   184 fun requires thy name what =
   185   if Context.exists_name name thy then ()
   185   if Context.exists_name name thy then ()
   186   else error ("Require theory " ^ quote name ^ " as an ancestor for " ^ what);
   186   else error ("Require theory " ^ quote name ^ " as an ancestor for " ^ what);
   187 
   187