equal
deleted
inserted
replaced
331 |
331 |
332 (*Instantiation of type variables in terms *) |
332 (*Instantiation of type variables in terms *) |
333 fun inst_term_tvars(tsig, tye) = map_term_types (inst_typ_tvars(tsig, tye)); |
333 fun inst_term_tvars(tsig, tye) = map_term_types (inst_typ_tvars(tsig, tye)); |
334 |
334 |
335 |
335 |
336 (* expand_typ *) |
336 (* norm_typ *) |
337 |
337 |
338 fun expand_typ (TySg {abbrs, ...}) ty = |
338 fun norm_typ (TySg {abbrs, ...}) ty = |
339 let |
339 let |
340 val idx = maxidx_of_typ ty + 1; |
340 val idx = maxidx_of_typ ty + 1; |
341 |
341 |
342 fun expand (Type (a, Ts)) = |
342 fun expand (Type (a, Ts)) = |
343 (case assoc (abbrs, a) of |
343 (case assoc (abbrs, a) of |
346 | None => Type (a, map expand Ts)) |
346 | None => Type (a, map expand Ts)) |
347 | expand T = T |
347 | expand T = T |
348 in |
348 in |
349 expand ty |
349 expand ty |
350 end; |
350 end; |
351 |
|
352 val norm_typ = expand_typ; |
|
353 |
|
354 |
351 |
355 |
352 |
356 (** type matching **) |
353 (** type matching **) |
357 |
354 |
358 exception TYPE_MATCH; |
355 exception TYPE_MATCH; |