Mercurial > urweb
diff src/mono_util.sml @ 193:8a70e2919e86
Specialization of single-parameter datatypes
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Fri, 08 Aug 2008 17:55:51 -0400 |
parents | 8e9f97508f0d |
children | 890a61991263 |
line wrap: on
line diff
--- a/src/mono_util.sml Fri Aug 08 10:59:06 2008 -0400 +++ b/src/mono_util.sml Fri Aug 08 17:55:51 2008 -0400 @@ -39,18 +39,7 @@ structure Typ = struct -fun join (o1, o2) = - case o1 of - EQUAL => o2 () - | v => v - -fun joinL f (os1, os2) = - case (os1, os2) of - (nil, nil) => EQUAL - | (nil, _) => LESS - | (h1 :: t1, h2 :: t2) => - join (f (h1, h2), fn () => joinL f (t1, t2)) - | (_ :: _, nil) => GREATER +open Order fun compare ((t1, _), (t2, _)) = case (t1, t2) of