src/HOL/Tools/record.ML
changeset 44121 44adaa6db327
parent 43685 5c9160f420d5
child 44653 6d8d09b90398
equal deleted inserted replaced
44120:01de796250a0 44121:44adaa6db327
  1510 
  1510 
  1511 fun read_typ ctxt raw_T env =
  1511 fun read_typ ctxt raw_T env =
  1512   let
  1512   let
  1513     val ctxt' = fold (Variable.declare_typ o TFree) env ctxt;
  1513     val ctxt' = fold (Variable.declare_typ o TFree) env ctxt;
  1514     val T = Syntax.read_typ ctxt' raw_T;
  1514     val T = Syntax.read_typ ctxt' raw_T;
  1515     val env' = OldTerm.add_typ_tfrees (T, env);
  1515     val env' = Misc_Legacy.add_typ_tfrees (T, env);
  1516   in (T, env') end;
  1516   in (T, env') end;
  1517 
  1517 
  1518 fun cert_typ ctxt raw_T env =
  1518 fun cert_typ ctxt raw_T env =
  1519   let
  1519   let
  1520     val thy = Proof_Context.theory_of ctxt;
  1520     val thy = Proof_Context.theory_of ctxt;
  1521     val T = Type.no_tvars (Sign.certify_typ thy raw_T)
  1521     val T = Type.no_tvars (Sign.certify_typ thy raw_T)
  1522       handle TYPE (msg, _, _) => error msg;
  1522       handle TYPE (msg, _, _) => error msg;
  1523     val env' = OldTerm.add_typ_tfrees (T, env);
  1523     val env' = Misc_Legacy.add_typ_tfrees (T, env);
  1524   in (T, env') end;
  1524   in (T, env') end;
  1525 
  1525 
  1526 
  1526 
  1527 (* attributes *)
  1527 (* attributes *)
  1528 
  1528