[
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: | 2005-11-29 (08:32) |
From: | Keiko Nakata <keiko@k...> |
Subject: | a role of explicit type coersion |
Hello, it is hard for me to understand why leafs.ml does not match with leafs.mli, while the compilation of leafs.ml alone is successful. leafs.ml: let rec leafs = function `Node (a, b) -> (leafs2 a) @ (leafs2 b) | `Var _ as l -> [l] | others -> [others] let leafs2 : ([> `Node of 'a * 'a ] as 'a) -> 'a list = (leafs2 :> ([> `Node of 'a * 'a ] as 'a) -> 'a list) leafs.mli: val leafs2 : ([> `Node of 'a * 'a ] as 'a) -> 'a list Best regards, Keiko NAKATA