# HG changeset patch # User Adam Chlipala # Date 1267728436 18000 # Node ID 26fed2c4f5be665e97b441eaf2e5b56fcd75adfc # Parent 51e596feec37974899cc7a74259e4a0938517468 Louder jscomp; toUpper/Lower fix for JavaScript diff -r 51e596feec37 -r 26fed2c4f5be lib/js/urweb.js --- a/lib/js/urweb.js Tue Mar 02 16:00:48 2010 -0500 +++ b/lib/js/urweb.js Thu Mar 04 13:47:16 2010 -0500 @@ -33,8 +33,8 @@ function isBlank(c) { return c == ' ' || c == '\t'; } function isSpace(c) { return isBlank(c) || c == '\r' || c == '\n'; } function isXdigit(c) { return isDigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); } -function toLower(c) { return c.toLowercase(); } -function toUpper(c) { return c.toUppercase(); } +function toLower(c) { return c.toLowerCase(); } +function toUpper(c) { return c.toUpperCase(); } // Lists diff -r 51e596feec37 -r 26fed2c4f5be lib/ur/top.ur --- a/lib/ur/top.ur Tue Mar 02 16:00:48 2010 -0500 +++ b/lib/ur/top.ur Thu Mar 04 13:47:16 2010 -0500 @@ -215,6 +215,14 @@ {f [nm] [t] [rest] ! r1 r2 r3}{acc}) +fun query1 [t ::: Name] [fs ::: {Type}] [state ::: Type] (q : sql_query [t = fs] []) + (f : $fs -> state -> transaction state) (i : state) = + query q (fn r => f r.t) i + +fun query1' [t ::: Name] [fs ::: {Type}] [state ::: Type] (q : sql_query [t = fs] []) + (f : $fs -> state -> state) (i : state) = + query q (fn r s => return (f r.t s)) i + fun queryL [tables] [exps] [tables ~ exps] (q : sql_query tables exps) = query q (fn r ls => return (r :: ls)) diff -r 51e596feec37 -r 26fed2c4f5be lib/ur/top.urs --- a/lib/ur/top.urs Tue Mar 02 16:00:48 2010 -0500 +++ b/lib/ur/top.urs Thu Mar 04 13:47:16 2010 -0500 @@ -129,6 +129,18 @@ sql_query tables exps -> transaction (list $(exps ++ map (fn fields :: {Type} => $fields) tables)) +val query1 : t ::: Name -> fs ::: {Type} -> state ::: Type + -> sql_query [t = fs] [] + -> ($fs -> state -> transaction state) + -> state + -> transaction state + +val query1' : t ::: Name -> fs ::: {Type} -> state ::: Type + -> sql_query [t = fs] [] + -> ($fs -> state -> state) + -> state + -> transaction state + val queryI : tables ::: {{Type}} -> exps ::: {Type} -> [tables ~ exps] => sql_query tables exps diff -r 51e596feec37 -r 26fed2c4f5be src/jscomp.sml --- a/src/jscomp.sml Tue Mar 02 16:00:48 2010 -0500 +++ b/src/jscomp.sml Thu Mar 04 13:47:16 2010 -0500 @@ -1,4 +1,4 @@ -(* Copyright (c) 2008, Adam Chlipala +(* Copyright (c) 2008-2010, Adam Chlipala * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1173,7 +1173,9 @@ | EJavaScript (m, e') => (foundJavaScript := true; jsExp m outer (e', st) - handle CantEmbed t => ((*Print.preface ("Can't embed", MonoPrint.p_typ MonoEnv.empty t);*) + handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript";*) + Print.preface ("Can't embed type in JavaScript", + MonoPrint.p_typ MonoEnv.empty t); (e, st))) | ESignalReturn e =>