Lines Matching defs:ty

76   let rec name_ty ty =
77 if Hashtbl.mem tys ty then () else
79 if is_type ty then
80 let s, stys = dest_type ty in
83 else print_vartype ty in
84 let n = variant_name_hash n used in Hashtbl.replace tys ty n
94 let rec name_ty ty =
95 if is_type ty then
96 let s, stys = dest_type ty in
101 let s = dest_vartype ty in
103 Hashtbl.replace tys s (variant_name_hash (print_vartype ty) used));
143 let rec oty_mono ts order oc ty =
144 if is_fun_ty ty then
146 0 -> os oc (Hashtbl.find ts ty)
148 let t1, t2 = dest_fun_ty ty in
151 let args, res = splitlist dest_fun_ty ty in
154 else os oc (Hashtbl.find ts ty);;
156 let rec oty_poly ts order oc ty =
158 if is_vartype ty then os oc (try Hashtbl.find ts (dest_vartype ty) with Not_found -> print_vartype ty) else
159 let pr_br ty =
160 let (s, tys) = dest_type ty in
164 List.iter (fun ty -> os oc " @ "; oty_poly ts order oc ty) tys;
170 if is_fun_ty ty then
172 0 -> pr_br ty
174 let args, res = splitlist dest_fun_ty ty in
179 let args, res = splitlist dest_fun_ty ty in
182 else pr_br ty;;
186 let (n, ty) = dest_const tm in
188 let inst = type_match gty ty [] in
203 oiter oc (fun oc ty -> oty_poly ts 0 oc ty) "," insts;
306 Hashtbl.iter (fun _ ty -> ohdr ty "type"; os oc ty; os oc " : $tType"; otl ()) ts;
349 if insts <> [] then (List.iter (fun ty -> os oc " @ "; oty_poly ts (-1) oc ty) insts; os oc ")");
387 let ty = get_const_type t in
388 let tvs = tyvars ty in
390 oty_poly ts (-1) oc ty; otl ())) cs;
400 let rec oty_isa ts oc ty =
401 if is_vartype ty then (os oc "'"; os oc (try Hashtbl.find ts (dest_vartype ty)
402 with Not_found -> print_vartype ty)) else
403 let (s, tys) = dest_type ty in
536 let ty = get_const_type c in let tvs = tyvars ty in
538 otyquant oc ts tvs; otff_funtype oc ts ty argno; otl ()