# HG changeset patch # User Adam Chlipala # Date 1313426008 14400 # Node ID 94ef0b07066aa5ac6c3de00d66374964f1f0f626 # Parent 659a2f71f5e55886468a14a57e90936b33700e4d Fix bug in JavaScript embedding of lists diff -r 659a2f71f5e5 -r 94ef0b07066a src/jscomp.sml --- a/src/jscomp.sml Mon Aug 15 11:26:10 2011 -0400 +++ b/src/jscomp.sml Mon Aug 15 12:33:28 2011 -0400 @@ -185,18 +185,12 @@ [((PNone rt, loc), str loc "null"), ((PSome (rt, (PVar ("x", rt), loc)), loc), - strcat loc [str loc ((if isNullable t' then - "{v:" - else - "") ^ "{_1:"), + strcat loc [str loc "{_1:", e', str loc ",_2:", (EApp ((ENamed n', loc), (EField ((ERel 0, loc), "2"), loc)), loc), - str loc ((if isNullable t' then - "}" - else - "") ^ "}")])], + str loc "}"])], {disc = t, result = s}), loc) val body = (EAbs ("x", t, s, body), loc)