reverted a87e49f4336d -- overwriting of data entries yields to merge problems later
authorblanchet
Fri, 07 Feb 2014 10:44:04 +0100
changeset 55356 3ea8ace6bc8a
parent 55355 b5b64d9d1002
child 55357 1dd39517e1ce
reverted a87e49f4336d -- overwriting of data entries yields to merge problems later
src/HOL/Tools/BNF/bnf_def.ML
src/HOL/Tools/BNF/bnf_fp_def_sugar.ML
src/HOL/Tools/Ctr_Sugar/ctr_sugar.ML
--- a/src/HOL/Tools/BNF/bnf_def.ML	Fri Feb 07 00:48:04 2014 +0100
+++ b/src/HOL/Tools/BNF/bnf_def.ML	Fri Feb 07 10:44:04 2014 +0100
@@ -1307,7 +1307,7 @@
 
 fun register_bnf key (bnf, lthy) =
   (bnf, Local_Theory.declaration {syntax = false, pervasive = true}
-    (fn phi => Data.map (Symtab.update (key, morph_bnf phi bnf))) lthy);
+    (fn phi => Data.map (Symtab.default (key, morph_bnf phi bnf))) lthy);
 
 fun bnf_def const_policy fact_policy qualify tacs wit_tac Ds map_b rel_b set_bs =
   (fn (_, goals, (triv_tac_opt, wit_goalss), after_qed, lthy, one_step_defs) =>
--- a/src/HOL/Tools/BNF/bnf_fp_def_sugar.ML	Fri Feb 07 00:48:04 2014 +0100
+++ b/src/HOL/Tools/BNF/bnf_fp_def_sugar.ML	Fri Feb 07 10:44:04 2014 +0100
@@ -180,7 +180,7 @@
 
 fun register_fp_sugar key fp_sugar =
   Local_Theory.declaration {syntax = false, pervasive = true}
-    (fn phi => Data.map (Symtab.update (key, morph_fp_sugar phi fp_sugar)));
+    (fn phi => Data.map (Symtab.default (key, morph_fp_sugar phi fp_sugar)));
 
 fun register_fp_sugars fp pre_bnfs nested_bnfs nesting_bnfs (fp_res as {Ts, ...}) ctr_defss
     ctr_sugars co_iterss mapss co_inducts co_iter_thmsss disc_co_itersss sel_co_iterssss lthy =
--- a/src/HOL/Tools/Ctr_Sugar/ctr_sugar.ML	Fri Feb 07 00:48:04 2014 +0100
+++ b/src/HOL/Tools/Ctr_Sugar/ctr_sugar.ML	Fri Feb 07 10:44:04 2014 +0100
@@ -152,10 +152,10 @@
 
 fun register_ctr_sugar key ctr_sugar =
   Local_Theory.declaration {syntax = false, pervasive = true}
-    (fn phi => Data.map (Symtab.update (key, morph_ctr_sugar phi ctr_sugar)));
+    (fn phi => Data.map (Symtab.default (key, morph_ctr_sugar phi ctr_sugar)));
 
 fun register_ctr_sugar_global key ctr_sugar =
-  Context.theory_map (Data.map (Symtab.update (key, ctr_sugar)));
+  Context.theory_map (Data.map (Symtab.default (key, ctr_sugar)));
 
 val rep_compat_prefix = "new";