diff options
author | Ziv Scully <ziv@mit.edu> | 2015-07-19 19:03:11 -0700 |
---|---|---|
committer | Ziv Scully <ziv@mit.edu> | 2015-07-19 19:03:11 -0700 |
commit | bc38beafd07b7ae6106a2fffda82084a08af7f06 (patch) | |
tree | 788e74a4e66ebe79ce8e03c2787c09e0ee529b0f /src/sqlcache.sml | |
parent | 03b7950e3639899de788cac8824a0e7f4be8a0bd (diff) |
Rename C functions and remove functors nested inside modules.
Diffstat (limited to 'src/sqlcache.sml')
-rw-r--r-- | src/sqlcache.sml | 30 |
1 files changed, 1 insertions, 29 deletions
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 |