Cleaned add and del attributes
authorchaieb
Fri, 06 Jul 2007 16:09:26 +0200
changeset 23606 60950b22dcbf
parent 23605 81d0fdec9edc
child 23607 6a8fb529b542
Cleaned add and del attributes
src/HOL/ex/reflection_data.ML
--- a/src/HOL/ex/reflection_data.ML	Fri Jul 06 16:09:25 2007 +0200
+++ b/src/HOL/ex/reflection_data.ML	Fri Jul 06 16:09:26 2007 +0200
@@ -9,8 +9,8 @@
 sig
   type entry
   val get: Proof.context -> entry
-  val del: thm list -> attribute
-  val add: thm list -> attribute 
+  val del: attribute
+  val add: attribute 
   val setup: theory -> theory
 end;
 
@@ -28,13 +28,14 @@
 
 val get = Data.get o Context.Proof;
 
-fun add ths = Thm.declaration_attribute (fn th => fn context => 
-  context |> Data.map (fn x => merge Thm.eq_thm (x,ths)))
+val add = Thm.declaration_attribute (fn th => fn context => 
+  context |> Data.map (Drule.add_rule th ))
 
-fun del ths = Thm.declaration_attribute (fn th => fn context => 
-  context |> Data.map (fn x => subtract Thm.eq_thm x ths))
+val del = Thm.declaration_attribute (fn th => fn context => 
+  context |> Data.map (Drule.del_rule th ))
 
 (* concrete syntax *)
+(*
 local
 fun keyword k = Scan.lift (Args.$$$ k -- Args.colon) >> K ();
 
@@ -52,9 +53,9 @@
  ((Scan.lift (Args.$$$ "del") |-- thms) >> del ||
   optional (keyword addN |-- thms) >> add)
 end;
-
+*)
 
 (* theory setup *)
  val setup =
-  Attrib.add_attributes [("reify", att_syntax, "Reify data")];
+  Attrib.add_attributes [("reify", Attrib.add_del_args add del, "Reify data")];
 end;