src/Tools/nbe.ML
changeset 24680 0d355aa59e67
parent 24634 38db11874724
child 24713 8b3b6d09ef40
equal deleted inserted replaced
24679:5b168969ffe0 24680:0d355aa59e67
   325                             | t => t);
   325                             | t => t);
   326     val anno_vars =
   326     val anno_vars =
   327       subst_Frees (map (fn (s, T) => (s, Term.Free (s, T))) (Term.add_frees t []))
   327       subst_Frees (map (fn (s, T) => (s, Term.Free (s, T))) (Term.add_frees t []))
   328       #> subst_Vars (map (fn (ixn, T) => (ixn, Var (ixn, T))) (Term.add_vars t []))
   328       #> subst_Vars (map (fn (ixn, T) => (ixn, Var (ixn, T))) (Term.add_vars t []))
   329     fun constrain t =
   329     fun constrain t =
   330       singleton (Syntax.check_terms (ProofContext.init thy)) (TypeInfer.constrain t ty);
   330       singleton (Syntax.check_terms (ProofContext.init thy)) (TypeInfer.constrain ty t);
   331     fun check_tvars t = if null (Term.term_tvars t) then t else
   331     fun check_tvars t = if null (Term.term_tvars t) then t else
   332       error ("Illegal schematic type variables in normalized term: "
   332       error ("Illegal schematic type variables in normalized term: "
   333         ^ setmp show_types true (Sign.string_of_term thy) t);
   333         ^ setmp show_types true (Sign.string_of_term thy) t);
   334   in
   334   in
   335     (vs_ty_t, deps)
   335     (vs_ty_t, deps)