equal
deleted
inserted
replaced
156 end; |
156 end; |
157 |
157 |
158 |
158 |
159 (* Instantiation morphism *) |
159 (* Instantiation morphism *) |
160 |
160 |
161 fun inst_morph (parm_names, parm_types) ((prfx, strict), insts') ctxt = |
161 fun inst_morph (parm_names, parm_types) ((prfx, mandatory), insts') ctxt = |
162 let |
162 let |
163 (* parameters *) |
163 (* parameters *) |
164 val type_parm_names = fold Term.add_tfreesT parm_types [] |> map fst; |
164 val type_parm_names = fold Term.add_tfreesT parm_types [] |> map fst; |
165 |
165 |
166 (* type inference and contexts *) |
166 (* type inference and contexts *) |
177 inst => SOME inst); |
177 inst => SOME inst); |
178 val instT = Symtab.make (type_parm_names ~~ map Logic.dest_type type_parms''); |
178 val instT = Symtab.make (type_parm_names ~~ map Logic.dest_type type_parms''); |
179 val inst = Symtab.make insts''; |
179 val inst = Symtab.make insts''; |
180 in |
180 in |
181 (Element.inst_morphism (ProofContext.theory_of ctxt) (instT, inst) $> |
181 (Element.inst_morphism (ProofContext.theory_of ctxt) (instT, inst) $> |
182 Morphism.binding_morphism (Binding.prefix strict prfx), ctxt') |
182 Morphism.binding_morphism (Binding.prefix mandatory prfx), ctxt') |
183 end; |
183 end; |
184 |
184 |
185 |
185 |
186 (*** Locale processing ***) |
186 (*** Locale processing ***) |
187 |
187 |