src/Pure/Syntax/syn_trans.ML
changeset 21750 41986849fee0
parent 21535 07f8cd0d7962
child 21773 0038f5fc2065
equal deleted inserted replaced
21749:3f0e86c92ff3 21750:41986849fee0
   244 fun strip_abss vars_of body_of tm =
   244 fun strip_abss vars_of body_of tm =
   245   let
   245   let
   246     val vars = vars_of tm;
   246     val vars = vars_of tm;
   247     val body = body_of tm;
   247     val body = body_of tm;
   248     val rev_new_vars = rename_wrt_term body vars;
   248     val rev_new_vars = rename_wrt_term body vars;
   249   in
   249     fun subst (x, T) b =
   250     (map mark_boundT (rev rev_new_vars),
   250       if can Name.dest_internal x andalso not (Term.loose_bvar1 (b, 0))
   251       subst_bounds (map (mark_bound o #1) rev_new_vars, body))
   251       then (Const ("_idtdummy", T), incr_boundvars ~1 b)
   252   end;
   252       else (mark_boundT (x, T), Term.subst_bound (mark_bound x, b));
       
   253     val (rev_vars', body') = fold_map subst rev_new_vars body;
       
   254   in (rev rev_vars', body') end;
   253 
   255 
   254 
   256 
   255 (*do (partial) eta-contraction before printing*)
   257 (*do (partial) eta-contraction before printing*)
   256 
   258 
   257 val eta_contract = ref true;
   259 val eta_contract = ref true;