src/HOL/Tools/datatype_realizer.ML
changeset 18929 d81435108688
parent 18358 0a733e11021a
child 19806 f860b7a98445
equal deleted inserted replaced
18928:042608ffa2ec 18929:d81435108688
    70           fun mk_prems vs [] = 
    70           fun mk_prems vs [] = 
    71                 let
    71                 let
    72                   val rT = List.nth (rec_result_Ts, i);
    72                   val rT = List.nth (rec_result_Ts, i);
    73                   val vs' = filter_out is_unit vs;
    73                   val vs' = filter_out is_unit vs;
    74                   val f = mk_Free "f" (map fastype_of vs' ---> rT) j;
    74                   val f = mk_Free "f" (map fastype_of vs' ---> rT) j;
    75                   val f' = Pattern.eta_contract (list_abs_free
    75                   val f' = Envir.eta_contract (list_abs_free
    76                     (map dest_Free vs, if i mem is then list_comb (f, vs')
    76                     (map dest_Free vs, if i mem is then list_comb (f, vs')
    77                       else HOLogic.unit));
    77                       else HOLogic.unit));
    78                 in (HOLogic.mk_Trueprop (make_pred i rT T (list_comb (f, vs'))
    78                 in (HOLogic.mk_Trueprop (make_pred i rT T (list_comb (f, vs'))
    79                   (list_comb (Const (cname, Ts ---> T), map Free frees))), f')
    79                   (list_comb (Const (cname, Ts ---> T), map Free frees))), f')
    80                 end
    80                 end