src/Pure/Isar/proof_context.ML
changeset 8637 e86e49aa1631
parent 8616 90d2fed59be1
child 8807 0046be1769f9
equal deleted inserted replaced
8636:635dd6b13028 8637:e86e49aa1631
   686 fun upd_bind (ctxt, ((x, i), t)) =
   686 fun upd_bind (ctxt, ((x, i), t)) =
   687   let
   687   let
   688     val T = Term.fastype_of t;
   688     val T = Term.fastype_of t;
   689     val t' =
   689     val t' =
   690       if null (Term.term_tvars t \\ Term.typ_tvars T) then t
   690       if null (Term.term_tvars t \\ Term.typ_tvars T) then t
   691       else Var ((x ^ "_has_extra_type_vars_on_rhs_", i), T);
   691       else Var ((x ^ "_has_extra_type_vars_on_rhs", i), T);
   692   in
   692   in
   693     ctxt
   693     ctxt
   694     |> declare_term t'
   694     |> declare_term t'
   695     |> map_context (fn (thy, data, asms, binds, thms, cases, defs) =>
   695     |> map_context (fn (thy, data, asms, binds, thms, cases, defs) =>
   696         (thy, data, asms, Vartab.update (((x, i), Some (t', T)), binds), thms, cases, defs))
   696         (thy, data, asms, Vartab.update (((x, i), Some (t', T)), binds), thms, cases, defs))