equal
deleted
inserted
replaced
36 val multi_thm: thm list context_parser |
36 val multi_thm: thm list context_parser |
37 val print_configs: Proof.context -> unit |
37 val print_configs: Proof.context -> unit |
38 val internal: (morphism -> attribute) -> src |
38 val internal: (morphism -> attribute) -> src |
39 val config_bool: bstring -> (Context.generic -> bool) -> bool Config.T * (theory -> theory) |
39 val config_bool: bstring -> (Context.generic -> bool) -> bool Config.T * (theory -> theory) |
40 val config_int: bstring -> (Context.generic -> int) -> int Config.T * (theory -> theory) |
40 val config_int: bstring -> (Context.generic -> int) -> int Config.T * (theory -> theory) |
|
41 val config_real: bstring -> (Context.generic -> real) -> real Config.T * (theory -> theory) |
41 val config_string: bstring -> (Context.generic -> string) -> string Config.T * (theory -> theory) |
42 val config_string: bstring -> (Context.generic -> string) -> string Config.T * (theory -> theory) |
42 val config_bool_global: bstring -> (Context.generic -> bool) -> bool Config.T * (theory -> theory) |
43 val config_bool_global: bstring -> (Context.generic -> bool) -> bool Config.T * (theory -> theory) |
43 val config_int_global: bstring -> (Context.generic -> int) -> int Config.T * (theory -> theory) |
44 val config_int_global: bstring -> (Context.generic -> int) -> int Config.T * (theory -> theory) |
44 val config_string_global: bstring -> (Context.generic -> string) -> string Config.T * (theory -> theory) |
45 val config_real_global: bstring -> (Context.generic -> real) -> real Config.T * (theory -> theory) |
|
46 val config_string_global: |
|
47 bstring -> (Context.generic -> string) -> string Config.T * (theory -> theory) |
45 end; |
48 end; |
46 |
49 |
47 structure Attrib: ATTRIB = |
50 structure Attrib: ATTRIB = |
48 struct |
51 struct |
49 |
52 |
351 fun scan_value (Config.Bool _) = |
354 fun scan_value (Config.Bool _) = |
352 equals -- Args.$$$ "false" >> K (Config.Bool false) || |
355 equals -- Args.$$$ "false" >> K (Config.Bool false) || |
353 equals -- Args.$$$ "true" >> K (Config.Bool true) || |
356 equals -- Args.$$$ "true" >> K (Config.Bool true) || |
354 Scan.succeed (Config.Bool true) |
357 Scan.succeed (Config.Bool true) |
355 | scan_value (Config.Int _) = equals |-- Parse.int >> Config.Int |
358 | scan_value (Config.Int _) = equals |-- Parse.int >> Config.Int |
|
359 | scan_value (Config.Real _) = equals |-- Parse.real >> Config.Real |
356 | scan_value (Config.String _) = equals |-- Args.name >> Config.String; |
360 | scan_value (Config.String _) = equals |-- Args.name >> Config.String; |
357 |
361 |
358 fun scan_config thy config = |
362 fun scan_config thy config = |
359 let val config_type = Config.get_global thy config |
363 let val config_type = Config.get_global thy config |
360 in scan_value config_type >> (K o Thm.declaration_attribute o K o Config.put_generic config) end; |
364 in scan_value config_type >> (K o Thm.declaration_attribute o K o Config.put_generic config) end; |
378 val config = coerce config_value; |
382 val config = coerce config_value; |
379 in (config, register_config config_value) end; |
383 in (config, register_config config_value) end; |
380 |
384 |
381 val config_bool = declare_config Config.Bool Config.bool false; |
385 val config_bool = declare_config Config.Bool Config.bool false; |
382 val config_int = declare_config Config.Int Config.int false; |
386 val config_int = declare_config Config.Int Config.int false; |
|
387 val config_real = declare_config Config.Real Config.real false; |
383 val config_string = declare_config Config.String Config.string false; |
388 val config_string = declare_config Config.String Config.string false; |
384 |
389 |
385 val config_bool_global = declare_config Config.Bool Config.bool true; |
390 val config_bool_global = declare_config Config.Bool Config.bool true; |
386 val config_int_global = declare_config Config.Int Config.int true; |
391 val config_int_global = declare_config Config.Int Config.int true; |
|
392 val config_real_global = declare_config Config.Real Config.real true; |
387 val config_string_global = declare_config Config.String Config.string true; |
393 val config_string_global = declare_config Config.String Config.string true; |
388 |
394 |
389 end; |
395 end; |
390 |
396 |
391 |
397 |