summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-01-01 11:26:34 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-01-01 11:26:34 -0500
commit8b3466d0a9c959d05f396c10cd71c7a889bfc0d9 (patch)
treead81dc4410270cae7348e7902dfaa459f763eae0 /src
parente20b0d94365c9f5ff493b14894685abdceab89ce (diff)
Basic datatype reactives
Diffstat (limited to 'src')
-rw-r--r--src/jscomp.sml17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/jscomp.sml b/src/jscomp.sml
index 5e7a2673..72d5cde5 100644
--- a/src/jscomp.sml
+++ b/src/jscomp.sml
@@ -182,7 +182,22 @@ fun jsExp mode skip outer =
str ":",
succ,
str ")"]
- | PCon _ => raise Fail "PCon"
+ | PCon (_, pc, NONE) =>
+ strcat [str ("(d" ^ Int.toString depth ^ "=="),
+ patCon pc,
+ str "?",
+ succ,
+ str ":",
+ fail,
+ str ")"]
+ | PCon (_, pc, SOME p) =>
+ strcat [str ("(d" ^ Int.toString depth ^ ".n=="),
+ patCon pc,
+ str ("?(d" ^ Int.toString depth ^ "=d" ^ Int.toString depth ^ ".v,"),
+ succ,
+ str "):",
+ fail,
+ str ")"]
| PRecord xps =>
let
val (_, succ) = foldl