summaryrefslogtreecommitdiff
path: root/doc/manual.tex
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-02-27 16:49:11 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-02-27 16:49:11 -0500
commitf59bbf0b942cd888c798c06ba6841bf94562a438 (patch)
tree64c89f63745865e9d0e443dc8cc8ecc2cac7900b /doc/manual.tex
parent1607362ff628b9a1476679fbf9146b66ce92a3ee (diff)
benignEffectful
Diffstat (limited to 'doc/manual.tex')
-rw-r--r--doc/manual.tex1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/manual.tex b/doc/manual.tex
index 6ac5a8d5..d9d40919 100644
--- a/doc/manual.tex
+++ b/doc/manual.tex
@@ -135,6 +135,7 @@ For each entry \texttt{M} in the module list, the file \texttt{M.urs} is include
Here is the complete list of directive forms. ``FFI'' stands for ``foreign function interface,'' Ur's facility for interaction between Ur programs and C and JavaScript libraries.
\begin{itemize}
\item \texttt{[allow|deny] [url|mime] PATTERN} registers a rule governing which URLs or MIME types are allowed in this application. The first such rule to match a URL or MIME type determines the verdict. If \texttt{PATTERN} ends in \texttt{*}, it is interpreted as a prefix rule. Otherwise, a string must match it exactly.
+\item \texttt{benignEffectful Module.ident} registers an FFI function or transaction as having side effects. The optimizer avoids removing, moving, or duplicating calls to such functions. Every effectful FFI function must be registered, or the optimizer may make invalid transformations. This version of the \texttt{effectful} directive registers that this function has only session-local side effects.
\item \texttt{clientOnly Module.ident} registers an FFI function or transaction that may only be run in client browsers.
\item \texttt{clientToServer Module.ident} adds FFI type \texttt{Module.ident} to the list of types that are OK to marshal from clients to servers. Values like XML trees and SQL queries are hard to marshal without introducing expensive validity checks, so it's easier to ensure that the server never trusts clients to send such values. The file \texttt{include/urweb.h} shows examples of the C support functions that are required of any type that may be marshalled. These include \texttt{attrify}, \texttt{urlify}, and \texttt{unurlify} functions.
\item \texttt{database DBSTRING} sets the string to pass to libpq to open a database connection.