coercions

git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@9980 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2002-06-19 03:25:28 +00:00
parent 7ffc4c20cf
commit f47f50a04f
1 changed files with 1 additions and 0 deletions

View File

@ -389,6 +389,7 @@ source type may be omitted.
\begin{caml_example}
type 'a wlist = [`Nil | `Cons of 'a * 'a wlist | `Snoc of 'a wlist * 'a];;
let wlist_of_vlist l = (l : 'a vlist :> 'a wlist);;
let open_vlist l = (l : 'a vlist :> [> 'a vlist]);;
fun x -> (x :> [`A|`B|`C]);;
\end{caml_example}