Mercurial > urweb
comparison doc/manual.tex @ 664:c90906b2f431
Spell-check manual
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 12 Mar 2009 12:34:39 -0400 |
parents | 039ad51cf9c3 |
children | f963356b53fd |
comparison
equal
deleted
inserted
replaced
663:bddf0da18db6 | 664:c90906b2f431 |
---|---|
1126 \hspace{.1in} \to \mt{r} :: \{\mt{K}\} \to \mt{folder} \; \mt{r} \to \mt{tf} \; \mt{r} | 1126 \hspace{.1in} \to \mt{r} :: \{\mt{K}\} \to \mt{folder} \; \mt{r} \to \mt{tf} \; \mt{r} |
1127 \end{array}$$ | 1127 \end{array}$$ |
1128 | 1128 |
1129 For a type-level record $\mt{r}$, a $\mt{folder} \; \mt{r}$ encodes a permutation of $\mt{r}$'s elements. The $\mt{fold}$ function can be called on a $\mt{folder}$ to iterate over the elements of $\mt{r}$ in that order. $\mt{fold}$ is parameterized on a type-level function to be used to calculate the type of each intermediate result of folding. After processing a subset $\mt{r'}$ of $\mt{r}$'s entries, the type of the accumulator should be $\mt{tf} \; \mt{r'}$. The next two expression arguments to $\mt{fold}$ are the usual step function and initial accumulator, familiar from fold functions over lists. The final two arguments are the record to fold over and a $\mt{folder}$ for it. | 1129 For a type-level record $\mt{r}$, a $\mt{folder} \; \mt{r}$ encodes a permutation of $\mt{r}$'s elements. The $\mt{fold}$ function can be called on a $\mt{folder}$ to iterate over the elements of $\mt{r}$ in that order. $\mt{fold}$ is parameterized on a type-level function to be used to calculate the type of each intermediate result of folding. After processing a subset $\mt{r'}$ of $\mt{r}$'s entries, the type of the accumulator should be $\mt{tf} \; \mt{r'}$. The next two expression arguments to $\mt{fold}$ are the usual step function and initial accumulator, familiar from fold functions over lists. The final two arguments are the record to fold over and a $\mt{folder}$ for it. |
1130 | 1130 |
1131 The Ur compiler treates $\mt{folder}$ like a constructor class, using built-in rules to infer $\mt{folder}$s for records with known structure. The order in which field names are mentioned in source code is used as a hint about the permutation that the programmer would like. | 1131 The Ur compiler treats $\mt{folder}$ like a constructor class, using built-in rules to infer $\mt{folder}$s for records with known structure. The order in which field names are mentioned in source code is used as a hint about the permutation that the programmer would like. |
1132 | 1132 |
1133 | 1133 |
1134 \section{The Ur/Web Standard Library} | 1134 \section{The Ur/Web Standard Library} |
1135 | 1135 |
1136 \subsection{Monads} | 1136 \subsection{Monads} |
1645 \subsection{Monoize} | 1645 \subsection{Monoize} |
1646 | 1646 |
1647 Programs are translated to a new intermediate language without polymorphism or non-$\mt{Type}$ constructors. Error messages may pop up here if earlier phases failed to remove such features. | 1647 Programs are translated to a new intermediate language without polymorphism or non-$\mt{Type}$ constructors. Error messages may pop up here if earlier phases failed to remove such features. |
1648 | 1648 |
1649 This is the stage at which concrete names are generated for cookies, tables, and sequences. They are named following the same convention as for links and actions, based on module path information saved from earlier stages. Table and sequence names separate path elements with underscores instead of slashes, and they are prefixed by \texttt{uw\_}. | 1649 This is the stage at which concrete names are generated for cookies, tables, and sequences. They are named following the same convention as for links and actions, based on module path information saved from earlier stages. Table and sequence names separate path elements with underscores instead of slashes, and they are prefixed by \texttt{uw\_}. |
1650 | |
1650 \subsection{MonoOpt} | 1651 \subsection{MonoOpt} |
1651 | 1652 |
1652 Simple algebraic laws are applied to simplify the program, focusing especially on efficient imperative generation of HTML pages. | 1653 Simple algebraic laws are applied to simplify the program, focusing especially on efficient imperative generation of HTML pages. |
1653 | 1654 |
1654 \subsection{MonoUntangle} | 1655 \subsection{MonoUntangle} |