annotate src/option_key_fn.sml @ 2243:da7d026d1a94

Fix possible formula simplification bug with extra formula' type.
author Ziv Scully <ziv@mit.edu>
date Mon, 20 Jul 2015 19:49:13 -0700
parents 88cc0f44c940
children e4a7e3cd6f11
rev   line source
ziv@2240 1 functor OptionKeyFn(K : ORD_KEY) : ORD_KEY = struct
ziv@2240 2
ziv@2240 3 type ord_key = K.ord_key option
ziv@2240 4
ziv@2240 5 val compare =
ziv@2240 6 fn (NONE, NONE) => EQUAL
ziv@2240 7 | (NONE, _) => LESS
ziv@2240 8 | (_, NONE) => GREATER
ziv@2240 9 | (SOME x, SOME y) => K.compare (x, y)
ziv@2240 10
ziv@2240 11 end