summaryrefslogtreecommitdiff
path: root/src/settings.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.sml')
-rw-r--r--src/settings.sml28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/settings.sml b/src/settings.sml
index cfbe98a5..eeaf8145 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -32,7 +32,8 @@ val configLib = ref Config.lib
val configSrcLib = ref Config.srclib
val configInclude = ref Config.includ
val configSitelisp = ref Config.sitelisp
-
+val configIcuIncludes = ref Config.icuIncludes
+val configIcuLibs = ref Config.icuLibs
val configCCompiler = ref Config.ccompiler
fun getCCompiler () = !configCCompiler
@@ -116,6 +117,7 @@ fun basis x = S.addList (S.empty, map (fn x : string => ("Basis", x)) x)
val clientToServerBase = basis ["int",
"float",
"string",
+ "char",
"time",
"file",
"unit",
@@ -156,6 +158,7 @@ fun isEffectful ("Sqlcache", _) = true
fun addEffectful x = effectful := S.add (!effectful, x)
val benignBase = basis ["get_cookie",
+ "getenv",
"new_client_source",
"get_client_source",
"set_client_source",
@@ -275,6 +278,7 @@ val jsFuncsBase = basisM [("alert", "alert"),
("urlifyFloat", "ts"),
("urlifyTime", "ts"),
("urlifyString", "uf"),
+ ("urlifyChar", "uf"),
("urlifyBool", "ub"),
("recv", "rv"),
("strcat", "cat"),
@@ -321,8 +325,10 @@ val jsFuncsBase = basisM [("alert", "alert"),
("ord", "ord"),
("checkUrl", "checkUrl"),
+ ("anchorUrl", "anchorUrl"),
("bless", "bless"),
("blessData", "blessData"),
+ ("currentUrl", "currentUrl"),
("eq_time", "eq"),
("lt_time", "lt"),
@@ -646,8 +652,10 @@ type dbms = {
onlyUnion : bool,
nestedRelops : bool,
windowFunctions: bool,
+ requiresTimestampDefaults : bool,
supportsIsDistinctFrom : bool,
- supportsSHA512 : bool
+ supportsSHA512 : {InitializeDb : string, GenerateHash : string -> string} option,
+ supportsSimilar : {InitializeDb : string} option
}
val dbmses = ref ([] : dbms list)
@@ -680,8 +688,10 @@ val curDb = ref ({name = "",
onlyUnion = false,
nestedRelops = false,
windowFunctions = false,
+ requiresTimestampDefaults = false,
supportsIsDistinctFrom = false,
- supportsSHA512 = false} : dbms)
+ supportsSHA512 = NONE,
+ supportsSimilar = NONE} : dbms)
fun addDbms v = dbmses := v :: !dbmses
fun setDbms s =
@@ -702,6 +712,10 @@ val sql = ref (NONE : string option)
fun setSql so = sql := so
fun getSql () = !sql
+val endpoints = ref (NONE : string option)
+fun setEndpoints so = endpoints := so
+fun getEndpoints () = !endpoints
+
val coreInline = ref 5
fun setCoreInline n = coreInline := n
fun getCoreInline () = !coreInline
@@ -728,7 +742,8 @@ fun getSigFile () = !sigFile
val fileCache = ref (NONE : string option)
fun setFileCache v =
- (if Option.isSome v andalso not (#supportsSHA512 (currentDbms ())) then
+ (if Option.isSome v andalso (case #supportsSHA512 (currentDbms ()) of NONE => true
+ | SOME _ => false) then
ErrorMsg.error "The selected database engine is incompatible with file caching."
else
();
@@ -740,9 +755,11 @@ structure SS = BinarySetFn(struct
val compare = String.compare
end)
+val safeGetDefault = ref false
val safeGet = ref SS.empty
+fun setSafeGetDefault b = safeGetDefault := b
fun setSafeGets ls = safeGet := SS.addList (SS.empty, ls)
-fun isSafeGet x = SS.member (!safeGet, x)
+fun isSafeGet x = !safeGetDefault orelse SS.member (!safeGet, x)
val onError = ref (NONE : (string * string list * string) option)
fun setOnError x = onError := x
@@ -1003,6 +1020,7 @@ fun reset () =
dbstring := NONE;
exe := NONE;
sql := NONE;
+ endpoints := NONE;
coreInline := 5;
monoInline := 5;
staticLinking := false;