src/Pure/type.ML
changeset 1484 b43cd8a8061f
parent 1460 5a6f2aabd538
child 1504 a65cf361e5c1
equal deleted inserted replaced
1483:617ca7312ceb 1484:b43cd8a8061f
   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;