# HG changeset patch # User Ziv Scully # Date 1416879684 18000 # Node ID ff38b3e0cdfd27214b411b9bcc5f2c8a405fc0dd # Parent f7113855f3b74d1e0439f29ae5a92c82941df845 Add interface to UnionFind. diff -r f7113855f3b7 -r ff38b3e0cdfd src/sqlcache.sml --- a/src/sqlcache.sml Tue Nov 11 04:25:20 2014 -0500 +++ b/src/sqlcache.sml Mon Nov 24 20:41:24 2014 -0500 @@ -341,6 +341,7 @@ fn Sql.Insert tableVals => valsToFormula tableVals | Sql.Delete (table, wher) => renameTables [(table, "T")] (sqexpToFormula wher) (* TODO: refine formula for the vals part, which could take into account the wher part. *) + (* TODO: use pushNegate instead of mapFormulaSigned? *) | Sql.Update (table, vals, wher) => let val f = sqexpToFormula wher diff -r f7113855f3b7 -r ff38b3e0cdfd src/union_find_fn.sml --- a/src/union_find_fn.sml Tue Nov 11 04:25:20 2014 -0500 +++ b/src/union_find_fn.sml Mon Nov 24 20:41:24 2014 -0500 @@ -1,4 +1,10 @@ -functor UnionFindFn(K : ORD_KEY) = struct +functor UnionFindFn(K : ORD_KEY) :> sig + type unionFind + val empty : unionFind + val union : unionFind * K.ord_key * K.ord_key -> unionFind + val union' : (K.ord_key * K.ord_key) * unionFind -> unionFind + val classes : unionFind -> K.ord_key list list +end = struct structure M = BinaryMapFn(K) structure S = BinarySetFn(K)