From bc38beafd07b7ae6106a2fffda82084a08af7f06 Mon Sep 17 00:00:00 2001 From: Ziv Scully Date: Sun, 19 Jul 2015 19:03:11 -0700 Subject: Rename C functions and remove functors nested inside modules. --- src/sqlcache.sml | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/sqlcache.sml') diff --git a/src/sqlcache.sml b/src/sqlcache.sml index 5f737ac5..ff58ef77 100644 --- a/src/sqlcache.sml +++ b/src/sqlcache.sml @@ -207,7 +207,7 @@ fun mapFormula mf = (* SQL analysis. *) -structure CmpKey : ORD_KEY = struct +structure CmpKey = struct type ord_key = Sql.cmp @@ -247,34 +247,6 @@ functor ListKeyFn (K : ORD_KEY) : ORD_KEY = struct end *) -functor OptionKeyFn (K : ORD_KEY) : ORD_KEY = struct - - type ord_key = K.ord_key option - - val compare = - fn (NONE, NONE) => EQUAL - | (NONE, _) => LESS - | (_, NONE) => GREATER - | (SOME x, SOME y) => K.compare (x, y) - -end - -functor TripleKeyFn (structure I : ORD_KEY - structure J : ORD_KEY - structure K : ORD_KEY) - : ORD_KEY where type ord_key = I.ord_key * J.ord_key * K.ord_key = struct - - type ord_key = I.ord_key * J.ord_key * K.ord_key - - fun compare ((i1, j1, k1), (i2, j2, k2)) = - case I.compare (i1, i2) of - EQUAL => (case J.compare (j1, j2) of - EQUAL => K.compare (k1, k2) - | ord => ord) - | ord => ord - -end - val rec chooseTwos : 'a list -> ('a * 'a) list = fn [] => [] | x :: ys => map (fn y => (x, y)) ys @ chooseTwos ys -- cgit v1.2.3