comparison src/flat_util.sml @ 99:5182f0c80d2e

Fix record type comparison
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 09:24:43 -0400
parents 198172560b73
children 717b6f8d8505
comparison
equal deleted inserted replaced
98:dcc5dda1645c 99:5182f0c80d2e
53 join (compare (d1, d2), fn () => compare (r1, r2)) 53 join (compare (d1, d2), fn () => compare (r1, r2))
54 | (TCode (d1, r1), TCode (d2, r2)) => 54 | (TCode (d1, r1), TCode (d2, r2)) =>
55 join (compare (d1, d2), fn () => compare (r1, r2)) 55 join (compare (d1, d2), fn () => compare (r1, r2))
56 | (TRecord xts1, TRecord xts2) => 56 | (TRecord xts1, TRecord xts2) =>
57 let 57 let
58 val xts2 = sortFields xts1 58 val xts1 = sortFields xts1
59 val xts2 = sortFields xts2 59 val xts2 = sortFields xts2
60 in 60 in
61 joinL compareFields (xts1, xts2) 61 joinL compareFields (xts1, xts2)
62 end 62 end
63 | (TNamed n1, TNamed n2) => Int.compare (n1, n2) 63 | (TNamed n1, TNamed n2) => Int.compare (n1, n2)