src/Pure/Tools/nbe.ML
changeset 24493 d4380e9b287b
parent 24219 e558fe311376
child 24508 c8b82fec6447
equal deleted inserted replaced
24492:de3fd08bb41c 24493:d4380e9b287b
   135     fun check_tvars t = if null (Term.term_tvars t) then t else
   135     fun check_tvars t = if null (Term.term_tvars t) then t else
   136       error ("Illegal schematic type variables in normalized term: "
   136       error ("Illegal schematic type variables in normalized term: "
   137         ^ setmp show_types true (Sign.string_of_term thy) t);
   137         ^ setmp show_types true (Sign.string_of_term thy) t);
   138     val ty = type_of t;
   138     val ty = type_of t;
   139     fun constrain t =
   139     fun constrain t =
   140       singleton (ProofContext.infer_types_pats (ProofContext.init thy)) (TypeInfer.constrain t ty);
   140       singleton (Syntax.check_terms (ProofContext.init thy)) (TypeInfer.constrain t ty);
   141     val _ = ensure_funs thy funcgr t;
   141     val _ = ensure_funs thy funcgr t;
   142   in
   142   in
   143     t
   143     t
   144     |> tracing (fn t => "Input:\n" ^ Display.raw_string_of_term t)
   144     |> tracing (fn t => "Input:\n" ^ Display.raw_string_of_term t)
   145     |> NBE_Eval.eval thy (!tab)
   145     |> NBE_Eval.eval thy (!tab)