src/HOL/Tools/BNF/bnf_gfp_rec_sugar.ML
changeset 56254 a2dd9200854d
parent 56152 2a31945b9a58
child 56805 8a87502c7da3
equal deleted inserted replaced
56253:83b3c110f22d 56254:a2dd9200854d
   961     val thy = Proof_Context.theory_of lthy;
   961     val thy = Proof_Context.theory_of lthy;
   962 
   962 
   963     val (bs, mxs) = map_split (apfst fst) fixes;
   963     val (bs, mxs) = map_split (apfst fst) fixes;
   964     val (arg_Ts, res_Ts) = map (strip_type o snd o fst #>> mk_tupleT_balanced) fixes |> split_list;
   964     val (arg_Ts, res_Ts) = map (strip_type o snd o fst #>> mk_tupleT_balanced) fixes |> split_list;
   965 
   965 
   966     val _ = (case filter_out (fn (_, T) => Sign.of_sort thy (T, HOLogic.typeS)) (bs ~~ arg_Ts) of
   966     val _ = (case filter_out (fn (_, T) => Sign.of_sort thy (T, @{sort type})) (bs ~~ arg_Ts) of
   967         [] => ()
   967         [] => ()
   968       | (b, _) :: _ => primcorec_error ("type of " ^ Binding.print b ^ " contains top sort"));
   968       | (b, _) :: _ => primcorec_error ("type of " ^ Binding.print b ^ " contains top sort"));
   969 
   969 
   970     val actual_nn = length bs;
   970     val actual_nn = length bs;
   971 
   971