src/Pure/Isar/locale.ML
changeset 42375 774df7c59508
parent 42360 da8817d01e7c
child 45290 f599ac41e7f5
equal deleted inserted replaced
42374:b9a6b465da25 42375:774df7c59508
   171   (case get_locale thy name of
   171   (case get_locale thy name of
   172     SOME (Loc loc) => loc
   172     SOME (Loc loc) => loc
   173   | NONE => error ("Unknown locale " ^ quote name));
   173   | NONE => error ("Unknown locale " ^ quote name));
   174 
   174 
   175 fun register_locale binding parameters spec intros axioms syntax_decls notes dependencies thy =
   175 fun register_locale binding parameters spec intros axioms syntax_decls notes dependencies thy =
   176   thy |> Locales.map (Name_Space.define true (Sign.naming_of thy)
   176   thy |> Locales.map (Name_Space.define (Proof_Context.init_global thy) true (Sign.naming_of thy)
   177     (binding,
   177     (binding,
   178       mk_locale ((parameters, spec, intros, axioms),
   178       mk_locale ((parameters, spec, intros, axioms),
   179         ((map (fn decl => (decl, serial ())) syntax_decls, map (fn n => (n, serial ())) notes),
   179         ((map (fn decl => (decl, serial ())) syntax_decls, map (fn n => (n, serial ())) notes),
   180           (map (fn d => (d |> apsnd (rpair Morphism.identity), serial ())) dependencies,
   180           (map (fn d => (d |> apsnd (rpair Morphism.identity), serial ())) dependencies,
   181             Inttab.empty)))) #> snd);
   181             Inttab.empty)))) #> snd);