From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 54AC4BB81 for ; Tue, 29 Nov 2005 09:32:11 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAT8WApL006396 for ; Tue, 29 Nov 2005 09:32:11 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA03394 for ; Tue, 29 Nov 2005 09:32:10 +0100 (MET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAT8W8XM006387 for ; Tue, 29 Nov 2005 09:32:09 +0100 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id jAT8W63S008588 for ; Tue, 29 Nov 2005 17:32:07 +0900 (JST) Date: Tue, 29 Nov 2005 17:32:06 +0900 (JST) Message-Id: <20051129.173206.68530481.keiko@kurims.kyoto-u.ac.jp> To: caml-list@inria.fr Subject: a role of explicit type coersion From: Keiko Nakata X-Mailer: Mew version 4.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 438C120A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 438C1208.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; mli:01 compilation:01 rec:01 node:01 node:01 mli:01 val:01 match:02 explicit:03 let:03 let:03 function:08 kyoto-u:10 kurims:10 type:13 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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