src/Pure/Isar/new_locale.ML
changeset 29206 62dc8762ec00
parent 29028 b5dad96c755a
child 29210 4025459e3f83
equal deleted inserted replaced
29036:df1113d916db 29206:62dc8762ec00
    45   val witness_attrib: attribute
    45   val witness_attrib: attribute
    46   val intro_attrib: attribute
    46   val intro_attrib: attribute
    47   val unfold_attrib: attribute
    47   val unfold_attrib: attribute
    48   val intro_locales_tac: bool -> Proof.context -> thm list -> tactic
    48   val intro_locales_tac: bool -> Proof.context -> thm list -> tactic
    49 
    49 
    50   (* Identifiers and registrations *)
    50   (* Registrations *)
    51   val clear_local_idents: Proof.context -> Proof.context
       
    52   val add_global_registration: (string * Morphism.morphism) -> theory -> theory
    51   val add_global_registration: (string * Morphism.morphism) -> theory -> theory
    53   val get_global_registrations: theory -> (string * Morphism.morphism) list
    52   val get_global_registrations: theory -> (string * Morphism.morphism) list
    54 
    53 
    55   (* Diagnostic *)
    54   (* Diagnostic *)
    56   val print_locales: theory -> unit
    55   val print_locales: theory -> unit
   221   )));
   220   )));
   222   
   221   
   223 fun get_global_idents thy =
   222 fun get_global_idents thy =
   224   let val (Ready ids) = (IdentifiersData.get o Context.Theory) thy in ids end;
   223   let val (Ready ids) = (IdentifiersData.get o Context.Theory) thy in ids end;
   225 val put_global_idents = Context.theory_map o IdentifiersData.put o Ready;
   224 val put_global_idents = Context.theory_map o IdentifiersData.put o Ready;
   226 val clear_global_idents = put_global_idents empty;
       
   227 
   225 
   228 fun get_local_idents ctxt =
   226 fun get_local_idents ctxt =
   229   let val (Ready ids) = (IdentifiersData.get o Context.Proof) ctxt in ids end;
   227   let val (Ready ids) = (IdentifiersData.get o Context.Proof) ctxt in ids end;
   230 val put_local_idents = Context.proof_map o IdentifiersData.put o Ready;
   228 val put_local_idents = Context.proof_map o IdentifiersData.put o Ready;
   231 val clear_local_idents = put_local_idents empty;
       
   232 
   229 
   233 end;
   230 end;
   234 
   231 
   235 
   232 
   236 (** Resolve locale dependencies in a depth-first fashion **)
   233 (** Resolve locale dependencies in a depth-first fashion **)