experimenting to add some useful interface for definitions
authorbulwahn
Wed, 23 Sep 2009 16:20:12 +0200
changeset 32661 f4d179d91af2
parent 32660 e3aab585531d
child 32662 2faf1148c062
experimenting to add some useful interface for definitions
src/HOL/HOL.thy
src/Pure/Isar/code.ML
src/Pure/Isar/specification.ML
--- a/src/HOL/HOL.thy	Wed Sep 23 16:20:12 2009 +0200
+++ b/src/HOL/HOL.thy	Wed Sep 23 16:20:12 2009 +0200
@@ -2023,13 +2023,7 @@
 
 subsection {* Preprocessing for the predicate compiler *}
 
-ML {*
-structure Predicate_Compile_Preproc_Const_Defs = Named_Thms
-(
-  val name = "predicate_compile_preproc_const_def"
-  val description = "definitions of constants as needed by the preprocessing for the predicate compiler "
-)
-*}
+setup {* Predicate_Compile_Preproc_Const_Defs.setup *}
 
 subsection {* Nitpick setup *}
 
--- a/src/Pure/Isar/code.ML	Wed Sep 23 16:20:12 2009 +0200
+++ b/src/Pure/Isar/code.ML	Wed Sep 23 16:20:12 2009 +0200
@@ -760,7 +760,7 @@
 end; (*struct*)
 
 
-(** type-safe interfaces for data depedent on executable code **)
+(** type-safe interfaces for data dependent on executable code **)
 
 functor Code_Data_Fun(Data: CODE_DATA_ARGS): CODE_DATA =
 struct
@@ -780,4 +780,13 @@
 
 end;
 
+(** datastructure to log definitions for preprocessing of the predicate compiler **)
+(*
+structure Predicate_Compile_Preproc_Const_Defs = Named_Thms
+(
+  val name = "predicate_compile_preproc_const_def"
+  val description =
+    "definitions of constants as needed by the preprocessing for the predicate compiler"
+)
+*)
 structure Code : CODE = struct open Code; end;
--- a/src/Pure/Isar/specification.ML	Wed Sep 23 16:20:12 2009 +0200
+++ b/src/Pure/Isar/specification.ML	Wed Sep 23 16:20:12 2009 +0200
@@ -209,7 +209,8 @@
         (var, ((Binding.suffix_name "_raw" name, []), rhs));
     val ((def_name, [th']), lthy3) = lthy2
       |> LocalTheory.note Thm.definitionK
-        ((name, Code.add_default_eqn_attrib :: atts), [prove lthy2 th]);
+        ((name, Predicate_Compile_Preproc_Const_Defs.add :: Code.add_default_eqn_attrib :: atts),
+          [prove lthy2 th]);
 
     val lhs' = Morphism.term (LocalTheory.target_morphism lthy3) lhs;
     val _ =