Mercurial > urweb
diff src/option_key_fn.sml @ 2240:88cc0f44c940
Rename C functions and remove functors nested inside modules.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Sun, 19 Jul 2015 19:03:11 -0700 |
parents | |
children | e4a7e3cd6f11 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/option_key_fn.sml Sun Jul 19 19:03:11 2015 -0700 @@ -0,0 +1,11 @@ +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