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
commit437a207ec01c2ab18bb424cc2d6d36b59f3c8efb (patch)
treea7076475ba537b7e8b99d2133d5f0b6340e55e61 /src/order.sml
parent901b6d55e625be136ddd677a3d8a36e5068de2ae (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