# HG changeset patch # User Adam Chlipala # Date 1263307333 18000 # Node ID 81ddb010751ed9557902fdeb2f166300a8c69ad6 # Parent 85d194409b170b98dc3e59c67807a1b99498b01a New release diff -r 85d194409b17 -r 81ddb010751e CHANGELOG --- a/CHANGELOG Sun Jan 10 13:44:22 2010 -0500 +++ b/CHANGELOG Tue Jan 12 09:42:13 2010 -0500 @@ -1,3 +1,12 @@ +======== +20100112 +======== + +- Basis.serialized type family, for storing more types in the database +- Basis.textBlob, for building blobs from strings +- Basis.debug function, for server-side debug printing +- Bug fixes & optimization improvements + ======== 20091230 ======== diff -r 85d194409b17 -r 81ddb010751e doc/manual.tex --- a/doc/manual.tex Sun Jan 10 13:44:22 2010 -0500 +++ b/doc/manual.tex Tue Jan 12 09:42:13 2010 -0500 @@ -1249,7 +1249,7 @@ \mt{datatype} \; \mt{list} \; \mt{t} = \mt{Nil} \mid \mt{Cons} \; \mt{of} \; \mt{t} \times \mt{list} \; \mt{t} \end{array}$$ -The only unusual element of this list is the $\mt{blob}$ type, which stands for binary sequences. +The only unusual element of this list is the $\mt{blob}$ type, which stands for binary sequences. Simple blobs can be created from strings via $\mt{Basis.textBlob}$. Blobs will also be generated from HTTP file uploads. Another important generic Ur element comes at the beginning of \texttt{top.urs}. @@ -1293,6 +1293,11 @@ \mt{val} \; \mt{transaction\_monad} : \mt{monad} \; \mt{transaction} \end{array}$$ +For debugging purposes, a transactional function is provided for outputting a string on the server process' \texttt{stderr}. +$$\begin{array}{l} + \mt{val} \; \mt{debug} : \mt{string} \to \mt{transaction} \; \mt{unit} +\end{array}$$ + \subsection{HTTP} There are transactions for reading an HTTP header by name and for getting and setting strongly-typed cookies. Cookies may only be created by the $\mt{cookie}$ declaration form, ensuring that they be named consistently based on module structure. @@ -1556,6 +1561,14 @@ \hspace{.1in} \to \mt{t} \to \mt{sql\_exp} \; \mt{tables} \; \mt{agg} \; \mt{exps} \; \mt{t} \end{array}$$ +Additionally, most function-free types may be injected safely, via the $\mt{serialized}$ type family. +$$\begin{array}{l} + \mt{con} \; \mt{serialized} :: \mt{Type} \to \mt{Type} \\ + \mt{val} \; \mt{serialize} : \mt{t} ::: \mt{Type} \to \mt{t} \to \mt{serialized} \; \mt{t} \\ + \mt{val} \; \mt{deserialize} : \mt{t} ::: \mt{Type} \to \mt{serialized} \; \mt{t} \to \mt{t} \\ + \mt{val} \; \mt{sql\_serialized} : \mt{t} ::: \mt{Type} \to \mt{sql\_injectable\_prim} \; (\mt{serialized} \; \mt{t}) +\end{array}$$ + We have the SQL nullness test, which is necessary because of the strange SQL semantics of equality in the presence of null values. $$\begin{array}{l} \mt{val} \; \mt{sql\_is\_null} : \mt{tables} ::: \{\{\mt{Type}\}\} \to \mt{agg} ::: \{\{\mt{Type}\}\} \to \mt{exps} ::: \{\mt{Type}\} \to \mt{t} ::: \mt{Type} \\