aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-08-02 16:33:25 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-08-02 16:33:25 -0400
commitfdc6c1310be60fbeb597400618473861f78676de (patch)
tree201d14d77f7f944545809bff02ae45fc826bb7e7 /doc
parent722b0c632007ac6ea178b05695974e447b4288a3 (diff)
Basis.getenv
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.tex9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/manual.tex b/doc/manual.tex
index 0b8f1c06..8944dcfd 100644
--- a/doc/manual.tex
+++ b/doc/manual.tex
@@ -135,7 +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|requestHeader|responseHeader] PATTERN} registers a rule governing which URLs, MIME types, HTTP request headers, or HTTP response headers are allowed to appear explicitly in this application. The first such rule to match a name 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{[allow|deny] [url|mime|requestHeader|responseHeader|env] PATTERN} registers a rule governing which URLs, MIME types, HTTP request headers, HTTP response headers, or environment variable names are allowed to appear explicitly in this application. The first such rule to match a name 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{alwaysInline PATH} requests that every call to the referenced function be inlined. Section \ref{structure} explains how functions are assigned path strings.
\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 only has side effects that remain local to a single page generation.
\item \texttt{clientOnly Module.ident} registers an FFI function or transaction that may only be run in client browsers.
@@ -1469,7 +1469,7 @@ $$\begin{array}{l}
\mt{val} \; \mt{fileData} : \mt{file} \to \mt{blob}
\end{array}$$
-It is also possible to get HTTP request headers and set HTTP response headers, using abstract types similar to the one for URLs.
+It is also possible to get HTTP request headers and environment variables, and set HTTP response headers, using abstract types similar to the one for URLs.
$$\begin{array}{l}
\mt{type} \; \mt{requestHeader} \\
@@ -1477,6 +1477,11 @@ $$\begin{array}{l}
\mt{val} \; \mt{checkRequestHeader} : \mt{string} \to \mt{option} \; \mt{requestHeader} \\
\mt{val} \; \mt{getHeader} : \mt{requestHeader} \to \mt{transaction} \; (\mt{option} \; \mt{string}) \\
\\
+ \mt{type} \; \mt{envVar} \\
+ \mt{val} \; \mt{blessEnvVar} : \mt{string} \to \mt{envVar} \\
+ \mt{val} \; \mt{checkEnvVar} : \mt{string} \to \mt{option} \; \mt{envVar} \\
+ \mt{val} \; \mt{getenv} : \mt{envVar} \to \mt{transaction} \; (\mt{option} \; \mt{string}) \\
+ \\
\mt{type} \; \mt{responseHeader} \\
\mt{val} \; \mt{blessResponseHeader} : \mt{string} \to \mt{responseHeader} \\
\mt{val} \; \mt{checkResponseHeader} : \mt{string} \to \mt{option} \; \mt{responseHeader} \\