equal
deleted
inserted
replaced
89 let |
89 let |
90 fun rew tm = |
90 fun rew tm = |
91 Pattern.rewrite_term thy [] (condrew' :: procs) tm |
91 Pattern.rewrite_term thy [] (condrew' :: procs) tm |
92 and condrew' tm = |
92 and condrew' tm = |
93 let |
93 let |
94 val cache = ref ([] : (term * term) list); |
94 val cache = Unsynchronized.ref ([] : (term * term) list); |
95 fun lookup f x = (case AList.lookup (op =) (!cache) x of |
95 fun lookup f x = (case AList.lookup (op =) (!cache) x of |
96 NONE => |
96 NONE => |
97 let val y = f x |
97 let val y = f x |
98 in (cache := (x, y) :: !cache; y) end |
98 in (cache := (x, y) :: !cache; y) end |
99 | SOME y => y); |
99 | SOME y => y); |