diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-01-01 11:26:34 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-01-01 11:26:34 -0500 |
commit | 1b475375ced4a2482cc90262e32ed42397025cc6 (patch) | |
tree | ad81dc4410270cae7348e7902dfaa459f763eae0 /src | |
parent | 783f041bd07a2a7fb308c1c7d474d8997ff5ab12 (diff) |
Basic datatype reactives
Diffstat (limited to 'src')
-rw-r--r-- | src/jscomp.sml | 17 |
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 |