src/Pure/ML/ml_context.ML
changeset 30574 b9bcc640ed58
parent 30573 49899f26fbd1
child 30588 05f81bbb2614
equal deleted inserted replaced
30573:49899f26fbd1 30574:b9bcc640ed58
    17   include BASIC_ML_CONTEXT
    17   include BASIC_ML_CONTEXT
    18   val the_generic_context: unit -> Context.generic
    18   val the_generic_context: unit -> Context.generic
    19   val the_global_context: unit -> theory
    19   val the_global_context: unit -> theory
    20   val the_local_context: unit -> Proof.context
    20   val the_local_context: unit -> Proof.context
    21   val exec: (unit -> unit) -> Context.generic -> Context.generic
    21   val exec: (unit -> unit) -> Context.generic -> Context.generic
    22   val inherit_env: Proof.context -> Proof.context -> Proof.context
    22   val inherit_env: Context.generic -> Context.generic -> Context.generic
    23   val name_space: ML_NameSpace.nameSpace
    23   val name_space: ML_NameSpace.nameSpace
    24   val stored_thms: thm list ref
    24   val stored_thms: thm list ref
    25   val ml_store_thm: string * thm -> unit
    25   val ml_store_thm: string * thm -> unit
    26   val ml_store_thms: string * thm list -> unit
    26   val ml_store_thms: string * thm list -> unit
    27   type antiq =
    27   type antiq =
    28     {struct_name: string, background: Proof.context} ->
    28     {struct_name: string, background: Proof.context} ->
    29       (Proof.context -> string * string) * Proof.context
    29       (Proof.context -> string * string) * Proof.context
    30   val add_antiq: string -> (Position.T -> antiq context_parser) -> unit
    30   val add_antiq: string -> (Position.T -> antiq context_parser) -> unit
    31   val trace: bool ref
    31   val trace: bool ref
    32   val eval_wrapper: (string -> unit) * (string -> 'a) -> bool -> Position.T -> string -> unit
    32   val eval_wrapper: (string -> unit) * (string -> 'a) -> bool ->
    33   val eval: bool -> Position.T -> string -> unit
    33     Position.T -> Symbol_Pos.text -> unit
       
    34   val eval: bool -> Position.T -> Symbol_Pos.text -> unit
    34   val eval_file: Path.T -> unit
    35   val eval_file: Path.T -> unit
    35   val eval_in: Proof.context option -> bool -> Position.T -> string -> unit
    36   val eval_in: Proof.context option -> bool -> Position.T -> Symbol_Pos.text -> unit
    36   val evaluate: Proof.context -> (string -> unit) * (string -> 'b) -> bool ->
    37   val evaluate: Proof.context -> (string -> unit) * (string -> 'b) -> bool ->
    37     string * (unit -> 'a) option ref -> string -> 'a
    38     string * (unit -> 'a) option ref -> string -> 'a
    38   val expression: Position.T -> string -> string -> string -> Context.generic -> Context.generic
    39   val expression: Position.T -> string -> string -> string -> Context.generic -> Context.generic
    39 end
    40 end
    40 
    41 
    75     Symtab.merge (K true) (structure1, structure2),
    76     Symtab.merge (K true) (structure1, structure2),
    76     Symtab.merge (K true) (signature1, signature2),
    77     Symtab.merge (K true) (signature1, signature2),
    77     Symtab.merge (K true) (functor1, functor2));
    78     Symtab.merge (K true) (functor1, functor2));
    78 );
    79 );
    79 
    80 
    80 val inherit_env = Context.proof_map o ML_Env.put o ML_Env.get o Context.Proof;
    81 val inherit_env = ML_Env.put o ML_Env.get;
    81 
    82 
    82 val name_space: ML_NameSpace.nameSpace =
    83 val name_space: ML_NameSpace.nameSpace =
    83   let
    84   let
    84     fun lookup sel1 sel2 name =
    85     fun lookup sel1 sel2 name =
    85       Context.thread_data ()
    86       Context.thread_data ()