proper binding positions within the defining command transaction;
authorwenzelm
Sun, 09 Sep 2018 13:48:20 +0200
changeset 68961 22a3790eecae
parent 68960 b85d509e7cbf
child 68962 50676b0ab970
child 68963 ed6511997d2b
proper binding positions within the defining command transaction;
src/HOL/Datatype_Examples/Compat.thy
--- a/src/HOL/Datatype_Examples/Compat.thy	Sun Sep 09 13:44:48 2018 +0200
+++ b/src/HOL/Datatype_Examples/Compat.thy	Sun Sep 09 13:48:20 2018 +0200
@@ -177,10 +177,10 @@
    [(@{binding N}, [], NoSyn),
     (@{binding C}, [@{typ 'a}, Type (Sign.full_name @{theory} @{binding l}, [@{typ 'a}])],
      NoSyn)])];
+
+Theory.setup (snd o BNF_LFP_Compat.add_datatype [] l_specs);
 \<close>
 
-setup \<open>snd o BNF_LFP_Compat.add_datatype [] l_specs\<close>
-
 ML \<open>get_descrs @{theory} (1, 1, 1) @{type_name l}\<close>
 
 thm l.exhaust l.map l.induct l.rec l.size
@@ -191,10 +191,10 @@
    [(@{binding T}, [@{typ 'b},
        Type (@{type_name l}, [Type (Sign.full_name @{theory} @{binding t}, [@{typ 'b}])])],
      NoSyn)])];
+
+Theory.setup (snd o BNF_LFP_Compat.add_datatype [] t_specs);
 \<close>
 
-setup \<open>snd o BNF_LFP_Compat.add_datatype [] t_specs\<close>
-
 ML \<open>get_descrs @{theory} (2, 2, 1) @{type_name t}\<close>
 
 thm t.exhaust t.map t.induct t.rec t.size
@@ -206,10 +206,10 @@
    [(@{binding FT0}, [], NoSyn),
     (@{binding FT}, [@{typ 'a} --> Type (Sign.full_name @{theory} @{binding ft}, [@{typ 'a}])],
      NoSyn)])];
+
+Theory.setup (snd o BNF_LFP_Compat.add_datatype [] ft_specs);
 \<close>
 
-setup \<open>snd o BNF_LFP_Compat.add_datatype [] ft_specs\<close>
-
 ML \<open>get_descrs @{theory} (1, 1, 1) @{type_name ft}\<close>
 
 thm ft.exhaust ft.induct ft.rec ft.size