src/HOL/BNF/Tools/bnf_ctr_sugar.ML
changeset 52958 5a77edcdbe54
parent 52937 cdd1d5049287
child 52963 96754402c851
equal deleted inserted replaced
52957:717a23e14586 52958:5a77edcdbe54
   202       Binding.qualify mandatory data_b_name o
   202       Binding.qualify mandatory data_b_name o
   203       (rep_compat ? Binding.qualify false rep_compat_prefix);
   203       (rep_compat ? Binding.qualify false rep_compat_prefix);
   204 
   204 
   205     val (As, B) =
   205     val (As, B) =
   206       no_defs_lthy
   206       no_defs_lthy
   207       |> variant_tfrees (map (fst o fst o dest_TVar) As0)
   207       |> variant_tfrees (map base_name_of_typ As0)
   208       ||> the_single o fst o mk_TFrees 1;
   208       ||> the_single o fst o mk_TFrees 1;
   209 
   209 
   210     val dataT = Type (dataT_name, As);
   210     val dataT = Type (dataT_name, As);
   211     val ctrs = map (mk_ctr As) ctrs0;
   211     val ctrs = map (mk_ctr As) ctrs0;
   212     val ctr_Tss = map (binder_types o fastype_of) ctrs;
   212     val ctr_Tss = map (binder_types o fastype_of) ctrs;