Commit 48134034 authored by POTTIER Francois's avatar POTTIER Francois

Fixed macro definition.

Aesthetic changes.
parent 9582eddf
......@@ -92,7 +92,7 @@
\newcommand{\foldtwo}{\texttt{fold2}\xspace}
\newcommand{\unit}{\texttt{unit}\xspace}
\newcommand{\visitors}{\texttt{visitors}\xspace}
\newcommand{\derivingvisitors}{\oc|[@@deriving visitors { ... }]|\xspace}
\newcommand{\derivingvisitors}{\texttt{[@@deriving visitors \{ ...\ \}]}\xspace}
\newcommand{\runtime}[1]{\oc|VisitorsRuntime.#1|}
\newcommand{\tyconvisitor}[1]{\texttt{visit\_#1}}
......
......@@ -142,10 +142,10 @@ literals and binary additions. The abstract syntax of these expressions can be
described by an algebraic data type \oc|expr|, shown in the first part of
\fref{fig:expr00}.
%
By annotating this type definition with \derivingvisitors, we
request the automated generation of a visitor for expressions. The annotation
\oc|[@@deriving visitors| \oc|{ ... }]| must carry at least one parameter,
\variety, which indicates what variety of visitor is desired.
By annotating this type definition with \derivingvisitors, we request the
automated generation of a visitor for expressions. The annotation
\derivingvisitors must carry at least one parameter, \variety, which indicates
what variety of visitor is desired.
The code of the visitor class, which is automatically generated and in normal
use remains invisible, is shown in the second part of \fref{fig:expr00}. The
......@@ -1162,8 +1162,10 @@ form \oc|'self c as 'self|, where \oc|c| is a class.
\foldtwo (\sref{sec:intro:aritytwo}).
\\
\end{tabular}
\vspace{5mm}
\caption{Parameters of \oc|[@@deriving visitors {...}]|}
\vspace{2.5mm}
\hrule
\vspace{2.5mm}
\caption{Parameters of \derivingvisitors}
\label{fig:params}
\end{figure}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment