Mercurial > urweb
comparison src/jscomp.sml @ 1422:07ef5771568d
Notice that Basis.now is effectful; smarter JavaScript encoding of initial source values built using server-side expressions that can't be turned into JavaScript
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 08 Feb 2011 16:54:01 -0500 |
parents | 82b204f20026 |
children | 66092ce45a76 |
comparison
equal
deleted
inserted
replaced
1421:3dab4696d116 | 1422:07ef5771568d |
---|---|
1184 val (e, st) = exp outer (e, st) | 1184 val (e, st) = exp outer (e, st) |
1185 in | 1185 in |
1186 ((EUnurlify (e, t, b), loc), st) | 1186 ((EUnurlify (e, t, b), loc), st) |
1187 end | 1187 end |
1188 | 1188 |
1189 | EJavaScript (m as Source t, e') => | |
1190 (foundJavaScript := true; | |
1191 let | |
1192 val (x', st) = jsExp m (t :: outer) ((ERel 0, loc), st) | |
1193 in | |
1194 ((ELet ("x", t, e', x'), loc), st) | |
1195 end | |
1196 handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript"; | |
1197 Print.preface ("Type", | |
1198 MonoPrint.p_typ MonoEnv.empty t);*) | |
1199 (e, st))) | |
1200 | |
1189 | EJavaScript (m, e') => | 1201 | EJavaScript (m, e') => |
1190 (foundJavaScript := true; | 1202 (foundJavaScript := true; |
1191 jsExp m outer (e', st) | 1203 jsExp m outer (e', st) |
1192 handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript"; | 1204 handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript"; |
1193 Print.preface ("Type", | 1205 Print.preface ("Type", |