PR#5850: polymorphic variant typo
git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@13302 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
6ac48bbe6b
commit
3451de93e0
|
@ -428,7 +428,7 @@ let rec eval x = eval2 eval x ;;
|
|||
|
||||
To make this even more comfortable, you may use type definitions as
|
||||
abbreviations for or-patterns. That is, if you have defined "type
|
||||
myvariant = [`Tag1 int | `Tag2 bool]", then the pattern "#myvariant" is
|
||||
myvariant = [`Tag1 of int | `Tag2 of bool]", then the pattern "#myvariant" is
|
||||
equivalent to writing "(`Tag1(_ : int) | `Tag2(_ : bool))".
|
||||
\begin{caml_eval}
|
||||
type myvariant = [`Tag1 of int | `Tag2 of bool];;
|
||||
|
|
Loading…
Reference in New Issue