From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA11081; Thu, 21 Oct 2004 21:25:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 VAA10524 for ; Thu, 21 Oct 2004 21:25:26 +0200 (MET DST) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9LJPQu9007647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 21 Oct 2004 21:25:26 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay01.plus.net with esmtp (Exim) id 1CKiYv-000Ixa-T8 for caml-list@inria.fr; Thu, 21 Oct 2004 19:25:25 +0000 From: Jon Harrop To: caml-list Subject: Re: [Caml-list] Polymorphism and the "for" loop Date: Thu, 21 Oct 2004 20:20:54 +0100 User-Agent: KMail/1.6.2 References: <200410211950.43396.jon@jdh30.plus.com> <41780A38.4030505@exomi.com> In-Reply-To: <41780A38.4030505@exomi.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410212020.54333.jon@jdh30.plus.com> X-Miltered: at concorde with ID 41780D26.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 silently:01 logical:02 unit:03 unit:03 wrote:03 cheers:06 polymorphism:06 loop:06 type:07 opposed:08 fun:08 approach:08 consider:09 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thursday 21 October 2004 20:12, Ville-Pertti Keinonen wrote: > Consider the fact that it's a warning as opposed to an error. I see. Does this stem from historical reasons or is there a logical reason why this should be a warning rather than an error? > ... > If your second example produced a type of unit -> unit for g, I think > your first example should fail with an error (rather than be accepted > with a warning). Yes, whereas the current approach can "fail" silently: # f (fun () -> 1);; - : unit = () Cheers, Jon. ------------------- 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