equal
deleted
inserted
replaced
705 of NONE => I |
705 of NONE => I |
706 | SOME sorts => fold2 (curry (Sorts.meet_sort algebra)) |
706 | SOME sorts => fold2 (curry (Sorts.meet_sort algebra)) |
707 (Consts.typargs consts c_ty) sorts) |
707 (Consts.typargs consts c_ty) sorts) |
708 | matchings _ = I |
708 | matchings _ = I |
709 val tvartab = (fold o fold_aterms) matchings ts Vartab.empty |
709 val tvartab = (fold o fold_aterms) matchings ts Vartab.empty |
710 handle Sorts.CLASS_ERROR e => Sorts.class_error pp e; |
710 handle Sorts.CLASS_ERROR e => error (Sorts.class_error pp e); |
711 val inst = map_type_tvar (fn (vi, _) => TVar (vi, the (Vartab.lookup tvartab vi))); |
711 val inst = map_type_tvar (fn (vi, _) => TVar (vi, the (Vartab.lookup tvartab vi))); |
712 in if Vartab.is_empty tvartab then NONE else SOME ((map o map_types) inst ts) end; |
712 in if Vartab.is_empty tvartab then NONE else SOME ((map o map_types) inst ts) end; |
713 |
713 |
714 fun init_instantiation (tycos, vs, sort) thy = |
714 fun init_instantiation (tycos, vs, sort) thy = |
715 let |
715 let |