src/Pure/Isar/local_theory.ML
changeset 63090 7aa9ac5165e4
parent 62844 eeea384cafc8
child 63267 ac1a0b81453e
equal deleted inserted replaced
63089:40134ddec3bf 63090:7aa9ac5165e4
    59   val pretty: local_theory -> Pretty.T list
    59   val pretty: local_theory -> Pretty.T list
    60   val add_thms_dynamic: binding * (Context.generic -> thm list) -> local_theory -> local_theory
    60   val add_thms_dynamic: binding * (Context.generic -> thm list) -> local_theory -> local_theory
    61   val set_defsort: sort -> local_theory -> local_theory
    61   val set_defsort: sort -> local_theory -> local_theory
    62   val type_notation: bool -> Syntax.mode -> (typ * mixfix) list -> local_theory -> local_theory
    62   val type_notation: bool -> Syntax.mode -> (typ * mixfix) list -> local_theory -> local_theory
    63   val notation: bool -> Syntax.mode -> (term * mixfix) list -> local_theory -> local_theory
    63   val notation: bool -> Syntax.mode -> (term * mixfix) list -> local_theory -> local_theory
    64   val generic_alias:
       
    65     (('a Name_Space.table -> 'a Name_Space.table) -> Context.generic -> Context.generic) ->
       
    66     binding -> string -> local_theory -> local_theory
       
    67   val class_alias: binding -> class -> local_theory -> local_theory
    64   val class_alias: binding -> class -> local_theory -> local_theory
    68   val type_alias: binding -> string -> local_theory -> local_theory
    65   val type_alias: binding -> string -> local_theory -> local_theory
    69   val const_alias: binding -> string -> local_theory -> local_theory
    66   val const_alias: binding -> string -> local_theory -> local_theory
    70   val init: Name_Space.naming -> operations -> Proof.context -> local_theory
    67   val init: Name_Space.naming -> operations -> Proof.context -> local_theory
    71   val exit: local_theory -> Proof.context
    68   val exit: local_theory -> Proof.context
   327   end;
   324   end;
   328 
   325 
   329 
   326 
   330 (* name space aliases *)
   327 (* name space aliases *)
   331 
   328 
   332 fun generic_alias app b name =
       
   333   declaration {syntax = false, pervasive = false} (fn phi => fn context =>
       
   334     let
       
   335       val naming = Name_Space.naming_of context;
       
   336       val b' = Morphism.binding phi b;
       
   337     in app (Name_Space.alias_table naming b' name) context end);
       
   338 
       
   339 fun syntax_alias global_alias local_alias b name =
   329 fun syntax_alias global_alias local_alias b name =
   340   declaration {syntax = true, pervasive = false} (fn phi =>
   330   declaration {syntax = true, pervasive = false} (fn phi =>
   341     let val b' = Morphism.binding phi b
   331     let val b' = Morphism.binding phi b
   342     in Context.mapping (global_alias b' name) (local_alias b' name) end);
   332     in Context.mapping (global_alias b' name) (local_alias b' name) end);
   343 
   333