Manual: fix verbatim type errors
parent
709da524e7
commit
e2005f02f9
|
@ -447,9 +447,9 @@ For example, assuming the record type
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
has been declared, the following expressions are equivalent:
|
has been declared, the following expressions are equivalent:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
let x = 1 and y = 2 in { x = x; y = y }
|
let x = 1. and y = 2. in { x = x; y = y },
|
||||||
let x = 1 and y = 2 in { x; y }
|
let x = 1. and y = 2. in { x; y },
|
||||||
let x = 1 and y = 2 in { x = x; y }
|
let x = 1. and y = 2. in { x = x; y }
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
On the object side, all following methods are equivalent:
|
On the object side, all following methods are equivalent:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
|
@ -462,8 +462,8 @@ On the object side, all following methods are equivalent:
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
Likewise, the following functions are equivalent:
|
Likewise, the following functions are equivalent:
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
fun {x = x; y = y} -> x + y
|
fun {x = x; y = y} -> x +. y
|
||||||
fun {x; y} -> x + y
|
fun {x; y} -> x +. y
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
Optionally, a record pattern can be terminated by @';' '_'@ to convey the
|
Optionally, a record pattern can be terminated by @';' '_'@ to convey the
|
||||||
|
@ -474,11 +474,11 @@ the compiler will warn when a record pattern fails to list all fields of
|
||||||
the corresponding record type and is not terminated by @';' '_'@.
|
the corresponding record type and is not terminated by @';' '_'@.
|
||||||
Continuing the "point" example above,
|
Continuing the "point" example above,
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
fun {x} -> x + 1
|
fun {x} -> x +. 1.
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\noindent will warn if warning 9 is on, while
|
\noindent will warn if warning 9 is on, while
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
fun {x; _} -> x + 1
|
fun {x; _} -> x +. 1.
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\noindent will not warn. This warning can help spot program points where
|
\noindent will not warn. This warning can help spot program points where
|
||||||
record patterns may need to be modified after new fields are added to a
|
record patterns may need to be modified after new fields are added to a
|
||||||
|
|
Loading…
Reference in New Issue