[
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 (13:42) |
From: | Keiko Nakata <keiko@k...> |
Subject: | Re: a role of explicit type coersion |
I am sorry, my codes had typos. I meant: leafs.ml: let rec leafs = function `Node (a, b) -> (leafs a) @ (leafs 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 Anyway, it seems impossible to hide `Var from the type of leafs2. Keiko