src/Pure/Isar/theory_target.ML
changeset 33670 02b7738aef6a
parent 33553 35f2b30593a8
child 33671 4b0f2599ed48
equal deleted inserted replaced
33669:ae9a2ea9a989 33670:02b7738aef6a
   308 (* init *)
   308 (* init *)
   309 
   309 
   310 local
   310 local
   311 
   311 
   312 fun init_target _ NONE = global_target
   312 fun init_target _ NONE = global_target
   313   | init_target thy (SOME target) = if Locale.defined thy (Locale.intern thy target)
   313   | init_target thy (SOME target) =
       
   314       if Locale.defined thy (Locale.intern thy target)
   314       then make_target target true (Class_Target.is_class thy target) ([], [], []) []
   315       then make_target target true (Class_Target.is_class thy target) ([], [], []) []
   315       else error ("No such locale: " ^ quote target);
   316       else error ("No such locale: " ^ quote target);
   316 
   317 
   317 fun init_ctxt (Target {target, is_locale, is_class, instantiation, overloading}) =
   318 fun init_ctxt (Target {target, is_locale, is_class, instantiation, overloading}) =
   318   if not (null (#1 instantiation)) then Class_Target.init_instantiation instantiation
   319   if not (null (#1 instantiation)) then Class_Target.init_instantiation instantiation