comparison src/prim.sml @ 479:ffa18975e661

Broaden set of possible especializations
author Adam Chlipala <adamc@hcoop.net>
date Sat, 08 Nov 2008 14:42:52 -0500
parents e89076c41c39
children 1901db85acb4
comparison
equal deleted inserted replaced
478:6ee1c761818f 479:ffa18975e661
65 | (Float n1, Float n2) => Real64.== (n1, n2) 65 | (Float n1, Float n2) => Real64.== (n1, n2)
66 | (String s1, String s2) => s1 = s2 66 | (String s1, String s2) => s1 = s2
67 67
68 | _ => false 68 | _ => false
69 69
70 fun compare (p1, p2) =
71 case (p1, p2) of
72 (Int n1, Int n2) => Int64.compare (n1, n2)
73 | (Int _, _) => LESS
74 | (_, Int _) => GREATER
75
76 | (Float n1, Float n2) => Real64.compare (n1, n2)
77 | (Float _, _) => LESS
78 | (_, Float _) => GREATER
79
80 | (String n1, String n2) => String.compare (n1, n2)
81
70 end 82 end