Mercurial > urweb
diff src/monoize.sml @ 395:9f67aac13cf7
ord_string
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 21 Oct 2008 11:22:10 -0400 |
parents | 9f6fe6f32961 |
children | 8084fa9216de |
line wrap: on
line diff
--- a/src/monoize.sml Tue Oct 21 11:19:17 2008 -0400 +++ b/src/monoize.sml Tue Oct 21 11:22:10 2008 -0400 @@ -761,6 +761,23 @@ boolBin "<", boolBin "<=") end + | L.EFfi ("Basis", "ord_string") => + let + fun boolBin s = + (L'.EAbs ("x", (L'.TFfi ("Basis", "string"), loc), + (L'.TFun ((L'.TFfi ("Basis", "string"), loc), (L'.TFfi ("Basis", "bool"), loc)), loc), + (L'.EAbs ("y", (L'.TFfi ("Basis", "string"), loc), + (L'.TFfi ("Basis", "bool"), loc), + (L'.EBinop (s, + (L'.EBinop ("strcmp", + (L'.ERel 1, loc), + (L'.ERel 0, loc)), loc), + (L'.EPrim (Prim.Int (Int64.fromInt 0)), loc)), loc)), loc)), loc) + in + ordEx ((L'.TFfi ("Basis", "string"), loc), + boolBin "<", + boolBin "<=") + end | L.ECApp ((L.EFfi ("Basis", "show"), _), t) => let