Manual: improve [%extension_constructor] example

master
octachron 2016-01-14 19:40:27 +02:00
parent e2005f02f9
commit e37632d6c8
1 changed files with 4 additions and 1 deletions

View File

@ -1802,8 +1802,11 @@ type t = ..
type t += X of int | Y of string type t += X of int | Y of string
let x = [%extension_constructor X] let x = [%extension_constructor X]
let y = [%extension_constructor Y] let y = [%extension_constructor Y]
let () = assert (x <> y)
\end{verbatim} \end{verbatim}
\caml
\? x <> y;;
\:- : bool = true
\endcaml
\section{Quoted strings}\label{s:quoted-strings} \section{Quoted strings}\label{s:quoted-strings}