summaryrefslogtreecommitdiff
path: root/src/order.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-08 14:42:52 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-08 14:42:52 -0500
commitb4fbebde89c6ed5eeae8653004417ac6000cdf07 (patch)
treea7076475ba537b7e8b99d2133d5f0b6340e55e61 /src/order.sml
parent234118f1f5bebfb0b8f5b1d2e8b80cee74e140a6 (diff)
Broaden set of possible especializations
Diffstat (limited to 'src/order.sml')
-rw-r--r--src/order.sml8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/order.sml b/src/order.sml
index 4a78823b..3f5bce65 100644
--- a/src/order.sml
+++ b/src/order.sml
@@ -42,4 +42,12 @@ fun joinL f (os1, os2) =
join (f (h1, h2), fn () => joinL f (t1, t2))
| (_ :: _, nil) => GREATER
+fun joinO f (v1, v2) =
+ case (v1, v2) of
+ (NONE, NONE) => EQUAL
+ | (NONE, _) => LESS
+ | (_, NONE) => GREATER
+
+ | (SOME v1, SOME v2) => f (v1, v2)
+
end