equal
deleted
inserted
replaced
14 val record_ex_sel_eq_simproc: simproc |
14 val record_ex_sel_eq_simproc: simproc |
15 val record_split_tac: int -> tactic |
15 val record_split_tac: int -> tactic |
16 val record_split_simp_tac: thm list -> (term -> int) -> int -> tactic |
16 val record_split_simp_tac: thm list -> (term -> int) -> int -> tactic |
17 val record_split_name: string |
17 val record_split_name: string |
18 val record_split_wrapper: string * wrapper |
18 val record_split_wrapper: string * wrapper |
19 val print_record_type_abbr: bool ref |
19 val print_record_type_abbr: bool Unsynchronized.ref |
20 val print_record_type_as_fields: bool ref |
20 val print_record_type_as_fields: bool Unsynchronized.ref |
21 end; |
21 end; |
22 |
22 |
23 signature RECORD = |
23 signature RECORD = |
24 sig |
24 sig |
25 include BASIC_RECORD |
25 include BASIC_RECORD |
26 val timing: bool ref |
26 val timing: bool Unsynchronized.ref |
27 val record_quick_and_dirty_sensitive: bool ref |
27 val record_quick_and_dirty_sensitive: bool Unsynchronized.ref |
28 val updateN: string |
28 val updateN: string |
29 val updN: string |
29 val updN: string |
30 val ext_typeN: string |
30 val ext_typeN: string |
31 val extN: string |
31 val extN: string |
32 val makeN: string |
32 val makeN: string |
285 tracing (str ^ Syntax.string_of_term_global Pure.thy t); |
285 tracing (str ^ Syntax.string_of_term_global Pure.thy t); |
286 |
286 |
287 |
287 |
288 (* timing *) |
288 (* timing *) |
289 |
289 |
290 val timing = ref false; |
290 val timing = Unsynchronized.ref false; |
291 fun timeit_msg s x = if !timing then (warning s; timeit x) else x (); |
291 fun timeit_msg s x = if !timing then (warning s; timeit x) else x (); |
292 fun timing_msg s = if !timing then warning s else (); |
292 fun timing_msg s = if !timing then warning s else (); |
293 |
293 |
294 |
294 |
295 (* syntax *) |
295 (* syntax *) |
877 ("_record_type_scheme",adv_record_type_scheme_tr)]; |
877 ("_record_type_scheme",adv_record_type_scheme_tr)]; |
878 |
878 |
879 |
879 |
880 (* print translations *) |
880 (* print translations *) |
881 |
881 |
882 val print_record_type_abbr = ref true; |
882 val print_record_type_abbr = Unsynchronized.ref true; |
883 val print_record_type_as_fields = ref true; |
883 val print_record_type_as_fields = Unsynchronized.ref true; |
884 |
884 |
885 fun gen_field_upds_tr' mark sfx (tm as Const (name_field, _) $ k $ u) = |
885 fun gen_field_upds_tr' mark sfx (tm as Const (name_field, _) $ k $ u) = |
886 let val t = (case k of (Abs (_,_,(Abs (_,_,t)$Bound 0))) |
886 let val t = (case k of (Abs (_,_,(Abs (_,_,t)$Bound 0))) |
887 => if null (loose_bnos t) then t else raise Match |
887 => if null (loose_bnos t) then t else raise Match |
888 | Abs (x,_,t) => if null (loose_bnos t) then t else raise Match |
888 | Abs (x,_,t) => if null (loose_bnos t) then t else raise Match |
1070 |
1070 |
1071 |
1071 |
1072 |
1072 |
1073 (** record simprocs **) |
1073 (** record simprocs **) |
1074 |
1074 |
1075 val record_quick_and_dirty_sensitive = ref false; |
1075 val record_quick_and_dirty_sensitive = Unsynchronized.ref false; |
1076 |
1076 |
1077 |
1077 |
1078 fun quick_and_dirty_prove stndrd thy asms prop tac = |
1078 fun quick_and_dirty_prove stndrd thy asms prop tac = |
1079 if !record_quick_and_dirty_sensitive andalso !quick_and_dirty |
1079 if !record_quick_and_dirty_sensitive andalso !quick_and_dirty |
1080 then Goal.prove (ProofContext.init thy) [] [] |
1080 then Goal.prove (ProofContext.init thy) [] [] |