diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | lib/js/urweb.js | 1 | ||||
-rw-r--r-- | lib/ur/datetime.ur | 11 | ||||
-rw-r--r-- | src/mysql.sml | 2 | ||||
-rw-r--r-- | src/reduce.sml | 5 |
5 files changed, 6 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am index 652296ea..11f9a132 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,7 +96,7 @@ endif uninstall-local-main: rm -f $(DESTDIR)$(BIN)/urweb $(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/datetime.urs \ - $(DESTDIR)$(LIB_UR)/listPair.urs \ $(DESTDIR)$(LIB_UR)/list.urs $(DESTDIR)$(LIB_UR)/monad.urs \ + $(DESTDIR)$(LIB_UR)/listPair.urs $(DESTDIR)$(LIB_UR)/list.urs $(DESTDIR)$(LIB_UR)/monad.urs \ $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs $(DESTDIR)$(LIB_UR)/char.ur \ $(DESTDIR)$(LIB_UR)/datetime.ur $(DESTDIR)$(LIB_UR)/listPair.ur $(DESTDIR)$(LIB_UR)/list.ur $(DESTDIR)$(LIB_UR)/monad.ur \ $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur $(DESTDIR)$(LIB_JS)/urweb.js \ diff --git a/lib/js/urweb.js b/lib/js/urweb.js index cb9a94af..2e350378 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -348,7 +348,6 @@ function strftime(fmt, thisTime) }; function fromDatetime(year, month, date, hour, minute, second) { - console.log(arguments); return (new Date(year, month, date, hour, minute, second)).getTime() * 1000; }; diff --git a/lib/ur/datetime.ur b/lib/ur/datetime.ur index 676f141f..9aeab291 100644 --- a/lib/ur/datetime.ur +++ b/lib/ur/datetime.ur @@ -107,16 +107,7 @@ val ord_datetime = mkOrd { Lt = fn a b => toTime a < toTime b, fun format fmt dt : string = timef fmt (toTime dt) -fun dayOfWeek dt : day_of_week = - case datetimeDayOfWeek (toTime dt) of - 0 => Sunday - | 1 => Monday - | 2 => Tuesday - | 3 => Wednesday - | 4 => Thursday - | 5 => Friday - | 6 => Saturday - | n => error <xml>Illegal day of week {[n]}</xml> +fun dayOfWeek dt : day_of_week = intToDayOfWeek (datetimeDayOfWeek (toTime dt)) val now : transaction t = n <- now; diff --git a/src/mysql.sml b/src/mysql.sml index e34efbd4..29a8c68f 100644 --- a/src/mysql.sml +++ b/src/mysql.sml @@ -80,7 +80,7 @@ fun checkRel (table, checkNullable) (s, xts) = String.substring (sl, 1, size sl - 2) else sl - val both = "LOWER(table_name) = ('" ^ sl ^ "')" + val both = "table_name = '" ^ sl ^ "'" val q = "SELECT COUNT(*) FROM information_schema." ^ table ^ " WHERE " ^ both diff --git a/src/reduce.sml b/src/reduce.sml index 933a4d94..8691b93a 100644 --- a/src/reduce.sml +++ b/src/reduce.sml @@ -849,7 +849,7 @@ fun reduce file = con = fn (_, n) => n, exp = fn (_, n) => n + 1} 0 - fun mayInline (polyC, n, t, e) = + fun mayInline (polyC, n, t, e, s) = let fun isPolicy t = case #1 t of @@ -857,6 +857,7 @@ fun reduce file = | TFun (_, t) => isPolicy t | _ => false in + not (Settings.checkNeverInline s) andalso case IM.find (uses, n) of NONE => false | SOME count => count <= 1 @@ -907,7 +908,7 @@ fun reduce file = ((DVal (x, n, t, e, s), loc), (polyC, namedC, - if mayInline (polyC, n, t, e) then + if mayInline (polyC, n, t, e, s) then IM.insert (namedE, n, e) else namedE)) |