# HG changeset patch # User Adam Chlipala # Date 1243960809 14400 # Node ID b0a85cbefed21a0a93190bc9582d7a1a39f32d31 # Parent 74e9e7642f0849eb0c64e2eb9cef9a330fefd87f Less whining about match failures; fix singleton record Jscomp bug diff -r 74e9e7642f08 -r b0a85cbefed2 lib/js/urweb.js --- a/lib/js/urweb.js Tue Jun 02 11:50:53 2009 -0400 +++ b/lib/js/urweb.js Tue Jun 02 12:40:09 2009 -0400 @@ -31,7 +31,7 @@ } function pf(loc) { - whine("Pattern match failure (" + loc + ")"); + throw ("Pattern match failure (" + loc + ")"); } function runHandlers(kind, ls, arg) { @@ -318,8 +318,11 @@ var x = input("select", s, function(x) { return function(v) { if (x.value != v) x.value = v; }; }); x.innerHTML = content; x.value = s.data; + if (x.value != s.data) + sv(s, x.value); x.onchange = function() { sv(s, x.value) }; + return x; } diff -r 74e9e7642f08 -r b0a85cbefed2 src/jscomp.sml --- a/src/jscomp.sml Tue Jun 02 11:50:53 2009 -0400 +++ b/src/jscomp.sml Tue Jun 02 12:40:09 2009 -0400 @@ -852,7 +852,7 @@ let val (e, st) = jsE inner (e, st) in - (strcat [str "{_x:", e, str "}"], st) + (strcat [str ("{_" ^ x ^ ":"), e, str "}"], st) end | ERecord ((x, e, _) :: xes) => let