equal
deleted
inserted
replaced
1713 (if mangled_s = unmangled_s then "" else "_" ^ ascii_of mangled_s) ^ |
1713 (if mangled_s = unmangled_s then "" else "_" ^ ascii_of mangled_s) ^ |
1714 (if needs_sound then typed_helper_suffix else untyped_helper_suffix) |
1714 (if needs_sound then typed_helper_suffix else untyped_helper_suffix) |
1715 fun specialize_helper t T = |
1715 fun specialize_helper t T = |
1716 if unmangled_s = app_op_name then |
1716 if unmangled_s = app_op_name then |
1717 let val tyenv = Sign.typ_match thy (alpha_to_beta, domain_type T) Vartab.empty in |
1717 let val tyenv = Sign.typ_match thy (alpha_to_beta, domain_type T) Vartab.empty in |
1718 monomorphic_term tyenv t |
1718 Envir.subst_term_types tyenv t |
1719 end |
1719 end |
1720 else |
1720 else |
1721 specialize_type thy (invert_const unmangled_s, T) t |
1721 specialize_type thy (invert_const unmangled_s, T) t |
1722 fun dub_and_inst needs_sound ((status, t), j) = |
1722 fun dub_and_inst needs_sound ((status, t), j) = |
1723 (if should_specialize_helper type_enc t then |
1723 (if should_specialize_helper type_enc t then |