equal
deleted
inserted
replaced
941 | atomic_tag (TVar ((a,_),_)) = a; |
941 | atomic_tag (TVar ((a,_),_)) = a; |
942 |
942 |
943 fun type_tag (Type("fun",[S,T])) = atomic_tag S ^ type_tag T |
943 fun type_tag (Type("fun",[S,T])) = atomic_tag S ^ type_tag T |
944 | type_tag T = atomic_tag T; |
944 | type_tag T = atomic_tag T; |
945 |
945 |
946 val memo_types = ref (Symtab.null : typ list Symtab.table); |
946 val memo_types = ref (Symtab.empty : typ list Symtab.table); |
947 |
947 |
948 (* special case of library/find_first *) |
948 (* special case of library/find_first *) |
949 fun find_type (T, []: typ list) = None |
949 fun find_type (T, []: typ list) = None |
950 | find_type (T, T'::Ts) = |
950 | find_type (T, T'::Ts) = |
951 if T=T' then Some T' |
951 if T=T' then Some T' |
971 let val Type (a,Ts) = T |
971 let val Type (a,Ts) = T |
972 in Type (a, map compress_type Ts) end; |
972 in Type (a, map compress_type Ts) end; |
973 |
973 |
974 (** Sharing of atomic terms **) |
974 (** Sharing of atomic terms **) |
975 |
975 |
976 val memo_terms = ref (Symtab.null : term list Symtab.table); |
976 val memo_terms = ref (Symtab.empty : term list Symtab.table); |
977 |
977 |
978 (* special case of library/find_first *) |
978 (* special case of library/find_first *) |
979 fun find_term (t, []: term list) = None |
979 fun find_term (t, []: term list) = None |
980 | find_term (t, t'::ts) = |
980 | find_term (t, t'::ts) = |
981 if t=t' then Some t' |
981 if t=t' then Some t' |