src/Pure/Isar/locale.ML
changeset 32845 d2d0b9b1a69d
parent 32804 ca430e6aee1c
child 32980 d556a0e04e33
equal deleted inserted replaced
32805:9b535493ac8d 32845:d2d0b9b1a69d
    66   val intro_add: attribute
    66   val intro_add: attribute
    67   val unfold_add: attribute
    67   val unfold_add: attribute
    68   val intro_locales_tac: bool -> Proof.context -> thm list -> tactic
    68   val intro_locales_tac: bool -> Proof.context -> thm list -> tactic
    69 
    69 
    70   (* Registrations and dependencies *)
    70   (* Registrations and dependencies *)
    71   val add_registration: string * morphism -> morphism * bool -> morphism -> theory -> theory
    71   val add_registration: string * morphism -> (morphism * bool) option ->
    72   val amend_registration: string * morphism -> morphism * bool -> morphism -> theory -> theory
    72     morphism -> theory -> theory
       
    73   val amend_registration: string * morphism -> morphism * bool ->
       
    74     morphism -> theory -> theory
    73   val add_registration_eqs: string * morphism -> thm list -> morphism -> theory -> theory
    75   val add_registration_eqs: string * morphism -> thm list -> morphism -> theory -> theory
    74   val amend_registration_legacy: morphism -> string * morphism -> theory -> theory
    76   val amend_registration_legacy: morphism -> string * morphism -> theory -> theory
    75   val add_dependency: string -> string * morphism -> morphism -> theory -> theory
    77   val add_dependency: string -> string * morphism -> morphism -> theory -> theory
    76 
    78 
    77   (* Diagnostic *)
    79   (* Diagnostic *)
   472         (get_idents (Context.Theory thy), thy)
   474         (get_idents (Context.Theory thy), thy)
   473         (* add new registrations with inherited mixins *)
   475         (* add new registrations with inherited mixins *)
   474         |> roundup thy add_reg export (name, base_morph)
   476         |> roundup thy add_reg export (name, base_morph)
   475         |> snd
   477         |> snd
   476         (* add mixin *)
   478         (* add mixin *)
   477         |> amend_registration (name, base_morph) mixin export
   479         |> (case mixin of NONE => I
       
   480              | SOME mixin => amend_registration (name, base_morph) mixin export)
   478         (* activate import hierarchy as far as not already active *)
   481         (* activate import hierarchy as far as not already active *)
   479         |> Context.theory_map (activate_facts' export (name, base_morph))
   482         |> Context.theory_map (activate_facts' export (name, base_morph))
   480       end
   483       end
   481   end;
   484   end;
   482 
   485