equal
deleted
inserted
replaced
46 val dest_Free: term -> string * typ |
46 val dest_Free: term -> string * typ |
47 val dest_Var: term -> indexname * typ |
47 val dest_Var: term -> indexname * typ |
48 val dest_comb: term -> term * term |
48 val dest_comb: term -> term * term |
49 val domain_type: typ -> typ |
49 val domain_type: typ -> typ |
50 val range_type: typ -> typ |
50 val range_type: typ -> typ |
|
51 val dest_funT: typ -> typ * typ |
51 val binder_types: typ -> typ list |
52 val binder_types: typ -> typ list |
52 val body_type: typ -> typ |
53 val body_type: typ -> typ |
53 val strip_type: typ -> typ list * typ |
54 val strip_type: typ -> typ list * typ |
54 val type_of1: typ list * term -> typ |
55 val type_of1: typ list * term -> typ |
55 val type_of: term -> typ |
56 val type_of: term -> typ |
284 |
285 |
285 |
286 |
286 fun domain_type (Type("fun", [T,_])) = T |
287 fun domain_type (Type("fun", [T,_])) = T |
287 and range_type (Type("fun", [_,T])) = T; |
288 and range_type (Type("fun", [_,T])) = T; |
288 |
289 |
|
290 fun dest_funT (Type ("fun", [T, U])) = (T, U) |
|
291 | dest_funT T = raise TYPE ("dest_funT", [T], []); |
|
292 |
|
293 |
289 (* maps [T1,...,Tn]--->T to the list [T1,T2,...,Tn]*) |
294 (* maps [T1,...,Tn]--->T to the list [T1,T2,...,Tn]*) |
290 fun binder_types (Type("fun",[S,T])) = S :: binder_types T |
295 fun binder_types (Type("fun",[S,T])) = S :: binder_types T |
291 | binder_types _ = []; |
296 | binder_types _ = []; |
292 |
297 |
293 (* maps [T1,...,Tn]--->T to T*) |
298 (* maps [T1,...,Tn]--->T to T*) |