Mercurial > urweb
diff src/compiler.sml @ 766:df09c95085f8
More FFI compiler options
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 02 May 2009 12:10:43 -0400 |
parents | a28982de5645 |
children | d27ed5ddeb52 |
line wrap: on
line diff
--- a/src/compiler.sml Sat May 02 11:27:26 2009 -0400 +++ b/src/compiler.sml Sat May 02 12:10:43 2009 -0400 @@ -45,6 +45,7 @@ ffi : string list, link : string list, headers : string list, + scripts : string list, clientToServer : Settings.ffi list, effectful : Settings.ffi list, clientOnly : Settings.ffi list, @@ -208,7 +209,7 @@ print = SourcePrint.p_file} fun p_job {prefix, database, exe, sql, sources, debug, profile, - timeout, ffi, link, headers, + timeout, ffi, link, headers, scripts, clientToServer, effectful, clientOnly, serverOnly, jsFuncs} = let open Print.PD @@ -241,6 +242,7 @@ newline, p_list_sep (box []) (fn s => box [string "Ffi", space, string s, newline]) ffi, p_list_sep (box []) (fn s => box [string "Header", space, string s, newline]) headers, + p_list_sep (box []) (fn s => box [string "Script", space, string s, newline]) scripts, p_list_sep (box []) (fn s => box [string "Link", space, string s, newline]) link, p_ffi "ClientToServer" clientToServer, p_ffi "Effectful" effectful, @@ -305,6 +307,7 @@ val ffi = ref [] val link = ref [] val headers = ref [] + val scripts = ref [] val clientToServer = ref [] val effectful = ref [] val clientOnly = ref [] @@ -323,6 +326,7 @@ ffi = rev (!ffi), link = rev (!link), headers = rev (!headers), + scripts = rev (!scripts), clientToServer = rev (!clientToServer), effectful = rev (!effectful), clientOnly = rev (!clientOnly), @@ -387,6 +391,7 @@ | "ffi" => ffi := relify arg :: !ffi | "link" => link := relifyA arg :: !link | "include" => headers := relifyA arg :: !headers + | "script" => scripts := arg :: !scripts | "clientToServer" => clientToServer := ffiS () :: !clientToServer | "effectful" => effectful := ffiS () :: !effectful | "clientOnly" => clientOnly := ffiS () :: !clientOnly @@ -402,6 +407,7 @@ Settings.setUrlPrefix (#prefix job); Settings.setTimeout (#timeout job); Settings.setHeaders (#headers job); + Settings.setScripts (#scripts job); Settings.setClientToServer (#clientToServer job); Settings.setEffectful (#effectful job); Settings.setClientOnly (#clientOnly job);