comparison src/mono_util.sml @ 1314:6c2e565adca6

Fixes for nasty bugs in Reduce and Especialize
author Adam Chlipala <adam@chlipala.net>
date Tue, 19 Oct 2010 17:54:49 -0400
parents b4480a56cab7
children 02fc16faecf3
comparison
equal deleted inserted replaced
1313:0bf73c3e4563 1314:6c2e565adca6
78 78
79 and compareFields ((x1, t1), (x2, t2)) = 79 and compareFields ((x1, t1), (x2, t2)) =
80 join (String.compare (x1, x2), 80 join (String.compare (x1, x2),
81 fn () => compare (t1, t2)) 81 fn () => compare (t1, t2))
82 82
83 and sortFields xts = ListMergeSort.sort (fn (x, y) => compareFields (x, y) = GREATER) xts 83 and sortFields xts = ListMergeSort.sort (fn ((x, _), (y, _)) => String.compare (x, y) = GREATER) xts
84 84
85 fun mapfold fc = 85 fun mapfold fc =
86 let 86 let
87 fun mft c acc = 87 fun mft c acc =
88 S.bindP (mft' c acc, fc) 88 S.bindP (mft' c acc, fc)