equal
deleted
inserted
replaced
725 val T = fixT (Sign.intern_typ sg |
725 val T = fixT (Sign.intern_typ sg |
726 (Syntax.typ_of_term (get_sort (Syntax.raw_term_sorts tm)) I tm)); |
726 (Syntax.typ_of_term (get_sort (Syntax.raw_term_sorts tm)) I tm)); |
727 |
727 |
728 fun mk_type_abbr subst name alphas = |
728 fun mk_type_abbr subst name alphas = |
729 let val abbrT = Type (name, map (fn a => TVar ((a, 0), Sign.defaultS sg)) alphas); |
729 let val abbrT = Type (name, map (fn a => TVar ((a, 0), Sign.defaultS sg)) alphas); |
730 in Syntax.term_of_typ (! Syntax.show_sorts) (Envir.norm_type subst abbrT) end; |
730 in Syntax.term_of_typ (! Syntax.show_sorts) |
|
731 (Sign.extern_typ sg (Envir.norm_type subst abbrT)) end; |
731 |
732 |
732 fun unify rT T = fst (Sign.typ_unify sg (Type.varifyT rT,T) (Vartab.empty,0)); |
733 fun unify rT T = fst (Sign.typ_unify sg (Type.varifyT rT,T) (Vartab.empty,0)); |
733 |
734 |
734 in if !print_record_type_abbr |
735 in if !print_record_type_abbr |
735 then (case last_extT T of |
736 then (case last_extT T of |
1692 in map (gen_record_tr') trnames end; |
1693 in map (gen_record_tr') trnames end; |
1693 |
1694 |
1694 val adv_record_type_abbr_tr's = |
1695 val adv_record_type_abbr_tr's = |
1695 let val trnames = NameSpace.accesses' (hd extension_names); |
1696 let val trnames = NameSpace.accesses' (hd extension_names); |
1696 val lastExt = (unsuffix ext_typeN (fst extension)); |
1697 val lastExt = (unsuffix ext_typeN (fst extension)); |
1697 in map (gen_record_type_abbr_tr' bname alphas zeta lastExt rec_schemeT0) trnames |
1698 in map (gen_record_type_abbr_tr' name alphas zeta lastExt rec_schemeT0) trnames |
1698 end; |
1699 end; |
1699 |
1700 |
1700 val adv_record_type_tr's = |
1701 val adv_record_type_tr's = |
1701 let val trnames = if parent_len > 0 then NameSpace.accesses' extN else []; |
1702 let val trnames = if parent_len > 0 then NameSpace.accesses' extN else []; |
1702 (* avoid conflict with adv_record_type_abbr_tr's *) |
1703 (* avoid conflict with adv_record_type_abbr_tr's *) |