Mercurial > urweb
comparison src/mono_util.sml @ 577:3d56940120b1
Setting a source server-side
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 30 Dec 2008 10:49:42 -0500 |
parents | ac947e2f29ff |
children | 1e589a60b86f |
comparison
equal
deleted
inserted
replaced
576:813f1e78d9d0 | 577:3d56940120b1 |
---|---|
49 joinL compareFields (xts1, xts2) | 49 joinL compareFields (xts1, xts2) |
50 end | 50 end |
51 | (TDatatype (n1, _), TDatatype (n2, _)) => Int.compare (n1, n2) | 51 | (TDatatype (n1, _), TDatatype (n2, _)) => Int.compare (n1, n2) |
52 | (TFfi (m1, x1), TFfi (m2, x2)) => join (String.compare (m1, m2), fn () => String.compare (x1, x2)) | 52 | (TFfi (m1, x1), TFfi (m2, x2)) => join (String.compare (m1, m2), fn () => String.compare (x1, x2)) |
53 | (TOption t1, TOption t2) => compare (t1, t2) | 53 | (TOption t1, TOption t2) => compare (t1, t2) |
54 | (TSource, TSource) => EQUAL | |
54 | (TSignal t1, TSignal t2) => compare (t1, t2) | 55 | (TSignal t1, TSignal t2) => compare (t1, t2) |
55 | 56 |
56 | (TFun _, _) => LESS | 57 | (TFun _, _) => LESS |
57 | (_, TFun _) => GREATER | 58 | (_, TFun _) => GREATER |
58 | 59 |
65 | (TFfi _, _) => LESS | 66 | (TFfi _, _) => LESS |
66 | (_, TFfi _) => GREATER | 67 | (_, TFfi _) => GREATER |
67 | 68 |
68 | (TOption _, _) => LESS | 69 | (TOption _, _) => LESS |
69 | (_, TOption _) => GREATER | 70 | (_, TOption _) => GREATER |
71 | |
72 | (TSource, _) => LESS | |
73 | (_, TSource) => GREATER | |
70 | 74 |
71 and compareFields ((x1, t1), (x2, t2)) = | 75 and compareFields ((x1, t1), (x2, t2)) = |
72 join (String.compare (x1, x2), | 76 join (String.compare (x1, x2), |
73 fn () => compare (t1, t2)) | 77 fn () => compare (t1, t2)) |
74 | 78 |
98 | TFfi _ => S.return2 cAll | 102 | TFfi _ => S.return2 cAll |
99 | TOption t => | 103 | TOption t => |
100 S.map2 (mft t, | 104 S.map2 (mft t, |
101 fn t' => | 105 fn t' => |
102 (TOption t, loc)) | 106 (TOption t, loc)) |
107 | TSource => S.return2 cAll | |
103 | TSignal t => | 108 | TSignal t => |
104 S.map2 (mft t, | 109 S.map2 (mft t, |
105 fn t' => | 110 fn t' => |
106 (TSignal t, loc)) | 111 (TSignal t, loc)) |
107 in | 112 in |