comparison src/jscomp.sml @ 588:5803b4f041cb

Basic datatype reactives
author Adam Chlipala <adamc@hcoop.net>
date Thu, 01 Jan 2009 11:26:34 -0500
parents 4c899701bd28
children 102e81d975e3
comparison
equal deleted inserted replaced
587:4c899701bd28 588:5803b4f041cb
180 strcat [str ("(d" ^ Int.toString depth ^ "?"), 180 strcat [str ("(d" ^ Int.toString depth ^ "?"),
181 fail, 181 fail,
182 str ":", 182 str ":",
183 succ, 183 succ,
184 str ")"] 184 str ")"]
185 | PCon _ => raise Fail "PCon" 185 | PCon (_, pc, NONE) =>
186 strcat [str ("(d" ^ Int.toString depth ^ "=="),
187 patCon pc,
188 str "?",
189 succ,
190 str ":",
191 fail,
192 str ")"]
193 | PCon (_, pc, SOME p) =>
194 strcat [str ("(d" ^ Int.toString depth ^ ".n=="),
195 patCon pc,
196 str ("?(d" ^ Int.toString depth ^ "=d" ^ Int.toString depth ^ ".v,"),
197 succ,
198 str "):",
199 fail,
200 str ")"]
186 | PRecord xps => 201 | PRecord xps =>
187 let 202 let
188 val (_, succ) = foldl 203 val (_, succ) = foldl
189 (fn ((x, p, _), (inner, succ)) => 204 (fn ((x, p, _), (inner, succ)) =>
190 (inner + E.patBindsN p, 205 (inner + E.patBindsN p,