1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
\section{Module \ocamlinlinecode{Labels}}\label{Labels}%
\subsection{Attached to unit\label{Labels--L1}}%
\subsection{Attached to nothing\label{Labels--L2}}%
\label{Labels--module-A}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Labels-A]{\ocamlinlinecode{A}}}\label{Labels-A}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Attached to module\label{Labels-A--L3}}%
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{Labels--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Attached to type\end{ocamlindent}%
\medbreak
\label{Labels--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : \hyperref[Labels--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to value\end{ocamlindent}%
\medbreak
\label{Labels--val-e}\ocamlcodefragment{\ocamltag{keyword}{val} e : unit \ocamltag{arrow}{$\rightarrow$} \hyperref[Labels--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to external\end{ocamlindent}%
\medbreak
\label{Labels--module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Labels-module-type-S]{\ocamlinlinecode{S}}}\label{Labels-module-type-S}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Attached to module type\label{Labels-module-type-S--L6}}%
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{Labels--class-c}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Labels-class-c]{\ocamlinlinecode{c}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\
\label{Labels--class-type-cs}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[Labels-class-type-cs]{\ocamlinlinecode{cs}}}\label{Labels-class-type-cs}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\subsubsection{Attached to class type\label{Labels-class-type-cs--L8}}%
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{Labels--exception-E}\ocamlcodefragment{\ocamltag{keyword}{exception} \ocamltag{exception}{E}}\begin{ocamlindent}Attached to exception\end{ocamlindent}%
\medbreak
\label{Labels--type-x}\ocamlcodefragment{\ocamltag{keyword}{type} x = .\allowbreak{}.\allowbreak{}}\\
\label{Labels--extension-decl-X}\ocamlcodefragment{\ocamltag{keyword}{type} \hyperref[Labels--type-x]{\ocamlinlinecode{x}} += }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{extension}{X}}\label{Labels--extension-X}\\
\end{ocamltabular}%
\\
\begin{ocamlindent}Attached to extension\end{ocamlindent}%
\medbreak
\label{Labels--module-S}\ocamlcodefragment{\ocamltag{keyword}{module} S := \hyperref[Labels-A]{\ocamlinlinecode{A}}}\begin{ocamlindent}Attached to module subst\end{ocamlindent}%
\medbreak
\label{Labels--type-s}\ocamlcodefragment{\ocamltag{keyword}{type} s := \hyperref[Labels--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to type subst\end{ocamlindent}%
\medbreak
\label{Labels--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u = }\\
\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{A'}}\label{Labels--type-u.A'}& Attached to constructor\\
\end{ocamltabular}%
\\
\label{Labels--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v = \{}\\
\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlinlinecode{f : \hyperref[Labels--type-t]{\ocamlinlinecode{t}};\allowbreak{}}\label{Labels--type-v.f}& Attached to field\\
\end{ocamltabular}%
\\
\ocamlcodefragment{\}}\\
Testing that labels can be referenced
\begin{itemize}\item{\hyperref[Labels--L1]{\ocamlinlinecode{Attached to unit}[p\pageref*{Labels--L1}]}}%
\item{\hyperref[Labels--L2]{\ocamlinlinecode{Attached to nothing}[p\pageref*{Labels--L2}]}}%
\item{\hyperref[Labels--L3]{\ocamlinlinecode{Attached to module}[p\pageref*{Labels--L3}]}}%
\item{\hyperref[Labels--L4]{\ocamlinlinecode{Attached to type}[p\pageref*{Labels--L4}]}}%
\item{\hyperref[Labels--L5]{\ocamlinlinecode{Attached to value}[p\pageref*{Labels--L5}]}}%
\item{\hyperref[Labels--L6]{\ocamlinlinecode{Attached to module type}[p\pageref*{Labels--L6}]}}%
\item{\hyperref[Labels--L7]{\ocamlinlinecode{Attached to class}[p\pageref*{Labels--L7}]}}%
\item{\hyperref[Labels--L8]{\ocamlinlinecode{Attached to class type}[p\pageref*{Labels--L8}]}}%
\item{\hyperref[Labels--L9]{\ocamlinlinecode{Attached to exception}[p\pageref*{Labels--L9}]}}%
\item{\hyperref[Labels--L10]{\ocamlinlinecode{Attached to extension}[p\pageref*{Labels--L10}]}}%
\item{\hyperref[Labels--L11]{\ocamlinlinecode{Attached to module subst}[p\pageref*{Labels--L11}]}}%
\item{\hyperref[Labels--L12]{\ocamlinlinecode{Attached to type subst}[p\pageref*{Labels--L12}]}}%
\item{\hyperref[Labels--L13]{\ocamlinlinecode{Attached to constructor}[p\pageref*{Labels--L13}]}}%
\item{\hyperref[Labels--L14]{\ocamlinlinecode{Attached to field}[p\pageref*{Labels--L14}]}}\end{itemize}%
\input{Labels.c.tex}
|