| 1 |
\documentclass[11pt]{article} |
| 2 |
\usepackage[latin1]{inputenc} |
| 3 |
\usepackage[T1]{fontenc} |
| 4 |
\usepackage{textcomp} |
| 5 |
\usepackage{fullpage} |
| 6 |
\usepackage{url} |
| 7 |
\usepackage{ocamldoc} |
| 8 |
\begin{document} |
| 9 |
\tableofcontents |
| 10 |
\section{Module {\tt{Functions}}} |
| 11 |
\label{Functions}\index{Functions@\verb`Functions`} |
| 12 |
\begin{ocamldocdescription} |
| 13 |
|
| 14 |
\end{ocamldocdescription} |
| 15 |
|
| 16 |
|
| 17 |
\ocamldocvspace{0.5cm} |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
\label{Functions.f1}\begin{ocamldoccode} |
| 22 |
val f1 : int -> y:int -> int |
| 23 |
\end{ocamldoccode} |
| 24 |
\index{f1@\verb`f1`} |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
\label{Functions.f2}\begin{ocamldoccode} |
| 30 |
val f2 : string -> y:int -> int option -> int |
| 31 |
\end{ocamldoccode} |
| 32 |
\index{f2@\verb`f2`} |
| 33 |
\begin{ocamldocdescription} |
| 34 |
There's no way to refer to the third arg in documentation. |
| 35 |
|
| 36 |
|
| 37 |
\end{ocamldocdescription} |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
\label{Functions.f3}\begin{ocamldoccode} |
| 43 |
val f3 : int -> int -> int -> int |
| 44 |
\end{ocamldoccode} |
| 45 |
\index{f3@\verb`f3`} |
| 46 |
\begin{ocamldocdescription} |
| 47 |
|
| 48 |
\end{ocamldocdescription} |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
\label{Functions.f4}\begin{ocamldoccode} |
| 54 |
val f4 : ?x:int -> ?y:int -> ?z:int -> unit -> int |
| 55 |
\end{ocamldoccode} |
| 56 |
\index{f4@\verb`f4`} |
| 57 |
\begin{ocamldocdescription} |
| 58 |
This output is a bit weird: we should probably refer |
| 59 |
to the third argument as {\tt{z}}, its label, rather than |
| 60 |
{\tt{blah}}, its internally-bound pattern. |
| 61 |
|
| 62 |
|
| 63 |
\end{ocamldocdescription} |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
\begin{ocamldoccode} |
| 69 |
{\tt{class m : }}\end{ocamldoccode} |
| 70 |
\label{class:Functions.m}\index{m@\verb`m`} |
| 71 |
|
| 72 |
\begin{ocamldocobjectend} |
| 73 |
|
| 74 |
|
| 75 |
\label{method:Functions.m.no-underscoreargs}\begin{ocamldoccode} |
| 76 |
method no_args : unit |
| 77 |
\end{ocamldoccode} |
| 78 |
\index{no-underscoreargs@\verb`no_args`} |
| 79 |
\begin{ocamldocdescription} |
| 80 |
|
| 81 |
\end{ocamldocdescription} |
| 82 |
|
| 83 |
|
| 84 |
\label{method:Functions.m.a-underscorefew-underscoreargs}\begin{ocamldoccode} |
| 85 |
method a_few_args : int -> int -> int -> int |
| 86 |
\end{ocamldoccode} |
| 87 |
\index{a-underscorefew-underscoreargs@\verb`a_few_args`} |
| 88 |
\begin{ocamldocdescription} |
| 89 |
|
| 90 |
\end{ocamldocdescription} |
| 91 |
\end{ocamldocobjectend} |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
\end{document} |