Mercurial > urweb
comparison src/core_util.sml @ 250:98f551ddd54b
Fix Core con comparison
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 09:52:52 -0400 |
parents | 5c50b17f5e4a |
children | 42dfb0d61cf0 |
comparison
equal
deleted
inserted
replaced
249:b6b75e6e0898 | 250:98f551ddd54b |
---|---|
158 | (CName _, _) => LESS | 158 | (CName _, _) => LESS |
159 | (_, CName _) => GREATER | 159 | (_, CName _) => GREATER |
160 | 160 |
161 | (CRecord (k1, xvs1), CRecord (k2, xvs2)) => | 161 | (CRecord (k1, xvs1), CRecord (k2, xvs2)) => |
162 join (Kind.compare (k1, k2), | 162 join (Kind.compare (k1, k2), |
163 fn () => joinL (fn ((x1, v1), (x2, v2)) => | 163 fn () => |
164 join (compare (x1, x2), | 164 let |
165 fn () => compare (v1, v2))) (xvs1, xvs2)) | 165 val sort = ListMergeSort.sort (fn ((x1, _), (x2, _)) => |
166 compare (x1, x2) = GREATER) | |
167 in | |
168 joinL (fn ((x1, v1), (x2, v2)) => | |
169 join (compare (x1, x2), | |
170 fn () => compare (v1, v2))) (sort xvs1, sort xvs2) | |
171 end) | |
166 | (CRecord _, _) => LESS | 172 | (CRecord _, _) => LESS |
167 | (_, CRecord _) => GREATER | 173 | (_, CRecord _) => GREATER |
168 | 174 |
169 | (CConcat (f1, s1), CConcat (f2, s2)) => | 175 | (CConcat (f1, s1), CConcat (f2, s2)) => |
170 join (compare (f1, f2), | 176 join (compare (f1, f2), |