From b17e821a36b67602778996dbf5ca7424a9f29c8e Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 25 Aug 2009 14:50:19 -0400 Subject: Fix list jsification bug; grid1 working with foreign key, but booleans not getting into database properly --- src/jscomp.sml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/jscomp.sml b/src/jscomp.sml index 7a6c3094..0ebdc94a 100644 --- a/src/jscomp.sml +++ b/src/jscomp.sml @@ -301,12 +301,18 @@ fun process file = [((PNone rt, loc), str loc "null"), ((PSome (rt, (PVar ("x", rt), loc)), loc), - strcat loc [str loc "{v:{_1:", + strcat loc [str loc ((if isNullable t' then + "{v:" + else + "") ^ "{_1:"), e', str loc ",_2:", (EApp ((ENamed n', loc), (EField ((ERel 0, loc), "2"), loc)), loc), - str loc "}}"])], + str loc ((if isNullable t' then + "}" + else + "") ^ "}")])], {disc = t, result = s}), loc) val body = (EAbs ("x", t, s, body), loc) -- cgit v1.2.3