[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe Raffalli <raffalli@u...> |
| Subject: | [Caml-list] Question about polymorphic variant |
After reading the manual, I am a bit confused ...
I should say this part of the manual could be clearer ?
In the following code, f and g typecheck but not h.
Why ?
let f = function
`a -> 0
| `b -> 1
let g = function
`c -> 2
| (`a | `b as x) -> f x
let h = function
`c -> 2
| x -> f x
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners