src/HOL/Tools/TFL/usyntax.ML
changeset 29270 0eade173f77e
parent 29265 5b4247055bd7
child 32287 65d5c5b30747
equal deleted inserted replaced
29269:5c25a2012975 29270:0eade173f77e
   110 fun dest_vtype (TVar x) = x
   110 fun dest_vtype (TVar x) = x
   111   | dest_vtype _ = raise USYN_ERR "dest_vtype" "not a flexible type variable";
   111   | dest_vtype _ = raise USYN_ERR "dest_vtype" "not a flexible type variable";
   112 
   112 
   113 val is_vartype = can dest_vtype;
   113 val is_vartype = can dest_vtype;
   114 
   114 
   115 val type_vars  = map mk_prim_vartype o typ_tvars
   115 val type_vars  = map mk_prim_vartype o OldTerm.typ_tvars
   116 fun type_varsl L = distinct (op =) (fold (curry op @ o type_vars) L []);
   116 fun type_varsl L = distinct (op =) (fold (curry op @ o type_vars) L []);
   117 
   117 
   118 val alpha  = mk_vartype "'a"
   118 val alpha  = mk_vartype "'a"
   119 val beta   = mk_vartype "'b"
   119 val beta   = mk_vartype "'b"
   120 
   120 
   140   in rev(add(tm,[]))
   140   in rev(add(tm,[]))
   141   end;
   141   end;
   142 
   142 
   143 
   143 
   144 
   144 
   145 val type_vars_in_term = map mk_prim_vartype o term_tvars;
   145 val type_vars_in_term = map mk_prim_vartype o OldTerm.term_tvars;
   146 
   146 
   147 
   147 
   148 
   148 
   149 (* Prelogic *)
   149 (* Prelogic *)
   150 fun dest_tybinding (v,ty) = (#1(dest_vtype v),ty)
   150 fun dest_tybinding (v,ty) = (#1(dest_vtype v),ty)