src/Pure/ML/ml_env.ML
changeset 69575 f77cc54f6d47
parent 68917 75691a5c8fb6
child 69576 cfac69e7b962
equal deleted inserted replaced
69574:b4ea943ce0b7 69575:f77cc54f6d47
     7 
     7 
     8 signature ML_ENV =
     8 signature ML_ENV =
     9 sig
     9 sig
    10   val Isabelle: string
    10   val Isabelle: string
    11   val SML: string
    11   val SML: string
    12   val ML_environment_raw: Config.raw
       
    13   val ML_environment: string Config.T
    12   val ML_environment: string Config.T
    14   val ML_read_global_raw: Config.raw
       
    15   val ML_read_global: bool Config.T
    13   val ML_read_global: bool Config.T
    16   val ML_write_global_raw: Config.raw
       
    17   val ML_write_global: bool Config.T
    14   val ML_write_global: bool Config.T
    18   val inherit: Context.generic list -> Context.generic -> Context.generic
    15   val inherit: Context.generic list -> Context.generic -> Context.generic
    19   type operations =
    16   type operations =
    20    {read_source: Input.source -> ML_Lex.token Antiquote.antiquote list,
    17    {read_source: Input.source -> ML_Lex.token Antiquote.antiquote list,
    21     explode_token: ML_Lex.token -> char list,
    18     explode_token: ML_Lex.token -> char list,
    46 (* named environments *)
    43 (* named environments *)
    47 
    44 
    48 val Isabelle = "Isabelle";
    45 val Isabelle = "Isabelle";
    49 val SML = "SML";
    46 val SML = "SML";
    50 
    47 
    51 val ML_environment_raw = Config.declare ("ML_environment", \<^here>) (fn _ => Config.String Isabelle);
    48 val ML_environment = Config.declare_string ("ML_environment", \<^here>) (K Isabelle);
    52 val ML_environment = Config.string ML_environment_raw;
       
    53 
    49 
    54 
    50 
    55 (* global read/write *)
    51 (* global read/write *)
    56 
    52 
    57 val ML_read_global_raw = Config.declare ("ML_read_global", \<^here>) (fn _ => Config.Bool true);
    53 val ML_read_global = Config.declare_bool ("ML_read_global", \<^here>) (K true);
    58 val ML_write_global_raw = Config.declare ("ML_write_global", \<^here>) (fn _ => Config.Bool true);
    54 val ML_write_global = Config.declare_bool ("ML_write_global", \<^here>) (K true);
    59 
       
    60 val ML_read_global = Config.bool ML_read_global_raw;
       
    61 val ML_write_global = Config.bool ML_write_global_raw;
       
    62 
    55 
    63 fun read_global context = Config.get_generic context ML_read_global;
    56 fun read_global context = Config.get_generic context ML_read_global;
    64 fun write_global context = Config.get_generic context ML_write_global;
    57 fun write_global context = Config.get_generic context ML_write_global;
    65 
    58 
    66 
    59