From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A0E3ABB9C for ; Mon, 21 Nov 2005 13:55:32 +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 jALCtWx0023955 for ; Mon, 21 Nov 2005 13:55:32 +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 NAA16401 for ; Mon, 21 Nov 2005 13:55:31 +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 jALCtTXQ023943 for ; Mon, 21 Nov 2005 13:55:30 +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 jALCtIkQ016253; Mon, 21 Nov 2005 21:55:18 +0900 (JST) Date: Mon, 21 Nov 2005 21:55:18 +0900 (JST) Message-Id: <20051121.215518.68549734.keiko@kurims.kyoto-u.ac.jp> To: oliver@first.in-berlin.de Cc: caml-list@inria.fr Subject: Re: [Caml-list] Feature wish: to omit explicit coercion for mli's From: Keiko Nakata In-Reply-To: <20051121094629.GC829@first.in-berlin.de> References: <20051121.183530.68544487.keiko@kurims.kyoto-u.ac.jp> <20051121094629.GC829@first.in-berlin.de> 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 4381C3C4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4381C3C1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 oliver:01 bandel:01 oliver:01 in-berlin:01 mli:01 mli:01 inserting:01 val:01 checker:01 annotations:01 polymorphic:01 polymorphic:01 define:01 coercion:01 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 From: Oliver Bandel > If *.ml and *.mli do not match, then you have written > code that better would be rewritten, to say it nicely. ;-) I do not think this is a bug-wish. ob.ml would match with ob.mli by inserting explicit coercion as in : in ob.ml: let o = (object method f1 = 1 method f2 = 2 end :> < f1 : int >) in ob.mli: val o : < f1 : int > I thought that this explicit coercion can be suppressed with little inefficiency of the type checker. I occasionally use immediate objects to build polymorphic objects without writing type annotations. (I mean, if I build polymorphic objects through class definitions, I may need to define the classes with many type parameters.) For the same reason, I thought that it would be nice if I could omit explicit coercion in some cases when it does not cause inefficiency a lot. Regards, Keiko