equal
deleted
inserted
replaced
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 |