equal
deleted
inserted
replaced
301 |
301 |
302 structure ConstName = CodeDataFun |
302 structure ConstName = CodeDataFun |
303 ( |
303 ( |
304 type T = const Symtab.table * string Symtab.table; |
304 type T = const Symtab.table * string Symtab.table; |
305 val empty = (Symtab.empty, Symtab.empty); |
305 val empty = (Symtab.empty, Symtab.empty); |
306 fun merge _ ((const1, constrev1), (const2, constrev2)) : T = |
306 fun purge _ cs (const, constrev) = (fold Symtab.delete_safe cs const, |
307 (Symtab.merge (op =) (const1, const2), |
307 fold Symtab.delete_safe (map_filter (Symtab.lookup const) cs) constrev); |
308 Symtab.merge (op =) (constrev1, constrev2)); |
|
309 fun purge _ NONE _ = empty |
|
310 | purge _ (SOME cs) (const, constrev) = (fold Symtab.delete_safe cs const, |
|
311 fold Symtab.delete_safe (map_filter (Symtab.lookup const) cs) constrev); |
|
312 ); |
308 ); |
313 |
309 |
314 val setup = CodeName.init; |
310 val setup = CodeName.init; |
315 |
311 |
316 |
312 |