summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-19 13:32:33 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-19 13:32:33 -0400
commit11fd1db04f22101a5a0fa8e1d5b57126e75f6eb5 (patch)
treef50a6fffa9a2e6aaacfe70b509015a14b90a0a16 /src
parente6166ff9bc4f189cadaf235672543890ef922d11 (diff)
Grid sorting working
Diffstat (limited to 'src')
-rw-r--r--src/jscomp.sml12
-rw-r--r--src/monoize.sml9
2 files changed, 21 insertions, 0 deletions
diff --git a/src/jscomp.sml b/src/jscomp.sml
index dd375168..30f578c4 100644
--- a/src/jscomp.sml
+++ b/src/jscomp.sml
@@ -874,6 +874,18 @@ fun process file =
str ")"],
st)
end
+ | EBinop ("strcmp", e1, e2) =>
+ let
+ val (e1, st) = jsE inner (e1, st)
+ val (e2, st) = jsE inner (e2, st)
+ in
+ (strcat [str "strcmp(",
+ e1,
+ str ",",
+ e2,
+ str ")"],
+ st)
+ end
| EBinop (s, e1, e2) =>
let
val s =
diff --git a/src/monoize.sml b/src/monoize.sml
index 865acff4..00230d1a 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -1024,6 +1024,15 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
boolBin "<",
boolBin "<=")
end
+ | L.ECApp ((L.EFfi ("Basis", "mkOrd"), _), t) =>
+ let
+ val t = monoType env t
+ val b = (L'.TFfi ("Basis", "bool"), loc)
+ val dom = ordTy t
+ in
+ ((L'.EAbs ("f", dom, dom,
+ (L'.ERel 0, loc)), loc), fm)
+ end
| L.ECApp ((L.EFfi ("Basis", "show"), _), t) =>
let